瀏覽代碼

No longer crash due to wrongly requesting a gizmo, fixes #26735

Juan Linietsky 6 年之前
父節點
當前提交
06dbeab5d4
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/3d/spatial.cpp

+ 1 - 1
scene/3d/spatial.cpp

@@ -178,7 +178,7 @@ void Spatial::_notification(int p_what) {
 				get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_enter_world, NULL, 0);
 			}
 #ifdef TOOLS_ENABLED
-			if (Engine::get_singleton()->is_editor_hint()) {
+			if (Engine::get_singleton()->is_editor_hint() && get_tree()->is_node_being_edited(this)) {
 
 				//get_scene()->call_group(SceneMainLoop::GROUP_CALL_REALTIME,SceneStringNames::get_singleton()->_spatial_editor_group,SceneStringNames::get_singleton()->_request_gizmo,this);
 				get_tree()->call_group_flags(0, SceneStringNames::get_singleton()->_spatial_editor_group, SceneStringNames::get_singleton()->_request_gizmo, this);