Merge branch 'master' into jc3-spam-killa

This commit is contained in:
Kim Kulling
2021-05-10 22:21:13 +02:00
committed by GitHub
12 changed files with 53 additions and 13 deletions

View File

@@ -805,7 +805,12 @@ static void ReadScene(SIB *sib, StreamReaderLE *stream) {
// Imports the given file into the given scene structure.
void SIBImporter::InternReadFile(const std::string &pFile,
aiScene *pScene, IOSystem *pIOHandler) {
StreamReaderLE stream(pIOHandler->Open(pFile, "rb"));
auto file = pIOHandler->Open(pFile, "rb");
if (!file)
throw DeadlyImportError("SIB: Could not open ", pFile);
StreamReaderLE stream(file);
// We should have at least one chunk
if (stream.GetRemainingSize() < 16)