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

@@ -107,7 +107,12 @@ const aiImporterDesc *Q3DImporter::GetInfo() const {
// Imports the given file into the given scene structure.
void Q3DImporter::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("Quick3D: Could not open ", pFile);
StreamReaderLE stream(file);
// The header is 22 bytes large
if (stream.GetRemainingSize() < 22)