summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-01-13 15:51:14 +0100
committerGitHub <noreply@github.com>2019-01-13 15:51:14 +0100
commitc6b587636b1e3cf27e566e6e5b10859316cbefb6 (patch)
treef5544e8497950b1a73f2346948758ced90c12597
parent14c2cf01c1d7e51145a5319b8053dd98cc786d9e (diff)
parent4a15f5522d90f094024d8ca8660ce85c51fd1cef (diff)
Merge pull request #24939 from Rubonnek/null-editor-icon-fix
Fixed null editor icon crash
-rw-r--r--editor/editor_path.cpp7
1 files 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<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