Merge pull request #30583 from hbina/fix_crash_issue_30493
Fix crashing when changing Node type.
This commit is contained in:
commit
5d962f8baf
|
@ -394,7 +394,11 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
|
|||
if (!profile_allow_editing) {
|
||||
break;
|
||||
}
|
||||
create_dialog->popup_create(false, true, scene_tree->get_selected()->get_class());
|
||||
|
||||
Node *selected = scene_tree->get_selected();
|
||||
if (selected)
|
||||
create_dialog->popup_create(false, true, selected->get_class());
|
||||
|
||||
} break;
|
||||
case TOOL_ATTACH_SCRIPT: {
|
||||
|
||||
|
|
Loading…
Reference in New Issue