Skip to content

Commit

Permalink
Merge pull request #122 from javagl/prevent-crash-meshopt
Browse files Browse the repository at this point in the history
Prevent crash when loading meshopt-compressed models
  • Loading branch information
javagl authored Dec 1, 2024
2 parents 5f2799e + 2f114e8 commit 84ce6d0
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,9 @@ private void initBufferModels()
logger.warning("Buffer " + i + " does not have "
+ "a uri. Binary chunks that are not the main GLB "
+ "buffer are not supported.");
ByteBuffer fallbackBuffer =
ByteBuffer.allocate(buffer.getByteLength());
bufferModel.setBufferData(fallbackBuffer);
}
else
{
Expand Down

0 comments on commit 84ce6d0

Please sign in to comment.