summaryrefslogtreecommitdiff
path: root/editor/editor_path.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_path.cpp')
-rw-r--r--editor/editor_path.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/editor/editor_path.cpp b/editor/editor_path.cpp
index 0eff1fd7dd..7e9d3a889e 100644
--- a/editor/editor_path.cpp
+++ b/editor/editor_path.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -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