aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins/canvas_item_editor_plugin.cpp
diff options
context:
space:
mode:
authorWilson E. Alvarez2017-08-25 11:14:33 -0400
committerWilson E. Alvarez2017-08-26 16:58:47 -0400
commit7a07895920196c00d1ee14187e4ccdb2a6f0d0b9 (patch)
treed8acd6c8d53717c3a4ec205b000ac8f0ff1fc985 /editor/plugins/canvas_item_editor_plugin.cpp
parent53c0010932f9c1becb63c16243f3a00ede359989 (diff)
downloadgodot-7a07895.tar.gz
godot-7a07895.tar.zst
godot-7a07895.zip
Added/Fixed null pointer checks
Diffstat (limited to 'editor/plugins/canvas_item_editor_plugin.cpp')
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 0dcabb177..433145a2e 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -3766,7 +3766,7 @@ bool CanvasItemEditorViewport::_cyclical_dependency_exists(const String &p_targe
void CanvasItemEditorViewport::_create_nodes(Node *parent, Node *child, String &path, const Point2 &p_point) {
child->set_name(path.get_file().get_basename());
- Ref<Texture> texture = Object::cast_to<Texture>(Ref<Texture>(ResourceCache::get(path)).ptr());
+ Ref<Texture> texture = Ref<Texture>(Object::cast_to<Texture>(ResourceCache::get(path)));
Size2 texture_size = texture->get_size();
editor_data->get_undo_redo().add_do_method(parent, "add_child", child);