From 4a15f5522d90f094024d8ca8660ce85c51fd1cef Mon Sep 17 00:00:00 2001 From: "Wilson E. Alvarez" Date: Sat, 12 Jan 2019 09:02:44 -0500 Subject: Fixed null editor icon crash Fixes #24932 --- editor/editor_path.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/editor/editor_path.cpp b/editor/editor_path.cpp index 440f891793..7e9d3a889e 100644 --- a/editor/editor_path.cpp +++ b/editor/editor_path.cpp @@ -119,9 +119,10 @@ void EditorPath::_notification(int p_what) { Ref 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 -- cgit v1.2.3