浏览代码

[scene-editor] fix corrupted cam settings

Clément Espeute 1 年之前
父节点
当前提交
5c35477484
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      hide/comp/SceneEditor.hx

+ 1 - 1
hide/comp/SceneEditor.hx

@@ -1453,7 +1453,7 @@ class SceneEditor {
 		if (settings == null)
 			return;
 
-		var id = Std.parseInt(settings.camTypeIndex);
+		var id = Std.parseInt(settings.camTypeIndex) ?? 0;
         var newClass = CameraControllerEditor.controllersClasses[id];
         if (Type.getClass(cameraController) != newClass.cl)
             switchCamController(newClass.cl);