소스 검색

ModelDatabase : fix save data on models wihout lodConfig

lviguier 1 년 전
부모
커밋
b4321d8988
1개의 변경된 파일8개의 추가작업 그리고 6개의 파일을 삭제
  1. 8 6
      h3d/prim/ModelDatabase.hx

+ 8 - 6
h3d/prim/ModelDatabase.hx

@@ -68,13 +68,15 @@ class ModelDatabase {
 		var isDefaultConfig = true;
 		var isDefaultConfig = true;
 		var defaultConfig = getDefaultLodConfig(@:privateAccess hmd.lib.resource.entry.directory);
 		var defaultConfig = getDefaultLodConfig(@:privateAccess hmd.lib.resource.entry.directory);
 
 
-		if (defaultConfig.length != @:privateAccess hmd.lodConfig.length)
-			isDefaultConfig = false;
-
-		for (idx in 0...@:privateAccess hmd.lodConfig.length) {
-			if (defaultConfig[idx] != @:privateAccess hmd.lodConfig[idx]) {
+		if (@:privateAccess hmd.lodConfig != null) {
+			if (defaultConfig.length != @:privateAccess hmd.lodConfig.length)
 				isDefaultConfig = false;
 				isDefaultConfig = false;
-				break;
+
+			for (idx in 0...@:privateAccess hmd.lodConfig.length) {
+				if (defaultConfig[idx] != @:privateAccess hmd.lodConfig[idx]) {
+					isDefaultConfig = false;
+					break;
+				}
 			}
 			}
 		}
 		}