2
0
Эх сурвалжийг харах

Fix null access on ModelLibrary.hx if no cb on emit

clementlandrin 11 сар өмнө
parent
commit
9fb31f9a4a

+ 2 - 1
hrt/prefab/l3d/ModelLibrary.hx

@@ -44,7 +44,8 @@ class MeshEmitter {
 		for ( i => mat in materials ) {
 			var batch = @:privateAccess libraryInstance.getBatch(batches[i]);
 			libraryInstance.library.emit({ mat : mat, mesh : mesh }, batch, absPos, emitCountTip, batch.meshBatchFlags);
-			cb(batch);
+			if ( cb != null )
+				cb(batch);
 		}
 	}
 }