Parcourir la source

Fix null access on some models computing logicNormal buffer.

clementlandrin il y a 2 ans
Parent
commit
58ee4b19c5
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5 1
      hxd/fmt/fbx/HMDOut.hx

+ 5 - 1
hxd/fmt/fbx/HMDOut.hx

@@ -157,9 +157,13 @@ class HMDOut extends BaseLibrary {
 			}
 		}
 		var realIdx = new hxd.IndexBuffer();
-		for( idx in idx )
+		for( idx in idx ) {
+			if ( idx == null )
+				trace("Empty list of vertex indexes");
 			for( i in idx )
 				realIdx.push(pmap[i]);
+		}
+			
 
 		var poly = new h3d.prim.Polygon(points, realIdx);
 		poly.addNormals();