Merge pull request #24939 from Rubonnek/null-editor-icon-fix

Fixed null editor icon crash
This commit is contained in:
Rémi Verschelde 2019-01-13 15:51:14 +01:00 committed by GitHub
commit c6b587636b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,9 +119,10 @@ void EditorPath::_notification(int p_what) {
Ref<Texture> icon = EditorNode::get_singleton()->get_object_icon(obj);
icon->draw(ci, Point2i(ofs, (size.height - icon->get_height()) / 2));
ofs += icon->get_width();
if (icon.is_valid()) {
icon->draw(ci, Point2i(ofs, (size.height - icon->get_height()) / 2));
ofs += icon->get_width();
}
if (i == history->get_path_size() - 1) {
//add name