From dd1589b2bc969e5f0d3ccee691b886fe735e0182 Mon Sep 17 00:00:00 2001 From: Shiqing Date: Fri, 12 Jul 2019 23:53:07 +0800 Subject: [PATCH] Fix potential crash caused by type mismatch in Ref --- editor/scene_tree_editor.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index 445ca3a792d..c1a14685b0f 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -70,7 +70,8 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i } } else if (p_id == BUTTON_SCRIPT) { RefPtr script = n->get_script(); - if (!script.is_null()) + Ref