mirror of
https://github.com/godotengine/godot.git
synced 2024-11-10 14:12:51 +00:00
Fix crash when saving root node by "Save Branch as Scene" with unsaved scene
Fix #7667
This commit is contained in:
parent
cdb0be8eed
commit
43a2599801
@ -646,6 +646,13 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
|
||||
|
||||
Node *tocopy = selection.front()->get();
|
||||
|
||||
if (tocopy==scene){
|
||||
accept->get_ok()->set_text(TTR("I see.."));
|
||||
accept->set_text(TTR("Can not perform with the root node."));
|
||||
accept->popup_centered_minsize();
|
||||
break;
|
||||
}
|
||||
|
||||
if (tocopy!=editor_data->get_edited_scene_root() && tocopy->get_filename()!="") {
|
||||
accept->get_ok()->set_text(TTR("I see.."));
|
||||
accept->set_text(TTR("This operation can't be done on instanced scenes."));
|
||||
|
Loading…
Reference in New Issue
Block a user