소스 검색

Don't cast item to Spatial when checking if it's locked

Not a necessary cast, and causes a crash any time it's not a Spatial.
Aaron Franke 5 년 전
부모
커밋
4af218f9e3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      editor/plugins/spatial_editor_plugin.cpp

+ 1 - 1
editor/plugins/spatial_editor_plugin.cpp

@@ -521,7 +521,7 @@ void SpatialEditorViewport::_select_region() {
 
 		if (selected.find(item) != -1) continue;
 
-		if (_is_node_locked(Object::cast_to<Spatial>(item))) continue;
+		if (_is_node_locked(item)) continue;
 
 		Ref<EditorSpatialGizmo> seg = sp->get_gizmo();