Parcourir la source

tmp issue tracking

ncannasse il y a 9 ans
Parent
commit
c5158c0050
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      h3d/prim/BigPrimitive.hx

+ 2 - 0
h3d/prim/BigPrimitive.hx

@@ -114,10 +114,12 @@ class BigPrimitive extends Primitive {
 	**/
 	public function flush() {
 		if( tmpBuf != null ) {
+			if( tmpIdx == null ) throw "tmpIdx is null";
 			if( bufPos > 0 && idxPos > 0 ) {
 				var b = h3d.Buffer.ofSubFloats(tmpBuf, stride, Std.int(bufPos/stride) #if debug ,null,allocPos #end);
 				if( isRaw ) b.flags.set(RawFormat);
 				buffers.push(b);
+				if( tmpIdx == null ) throw "tmpIdx is null(2)";
 				allIndexes.push(h3d.Indexes.alloc(tmpIdx, 0, idxPos));
 			}
 			if( PREV_BUFFER == null || PREV_BUFFER.length < tmpBuf.length )