Skip to content

Commit 86e56bc

Browse files
committed
Fixed getBuffers on empty mesh.
1 parent f3bed8c commit 86e56bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hxd/fmt/hmd/Library.hx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ class Library {
183183
isize = geom.indexCounts[material] * imult;
184184
}
185185
var ibuf = haxe.io.Bytes.alloc(isize);
186-
entry.readFull(ibuf, dataPos, isize);
186+
if ( isize > 0 )
187+
entry.readFull(ibuf, dataPos, isize);
187188

188189
var buf = new GeometryBuffer();
189190
if( material == null ) {

0 commit comments

Comments
 (0)