|
@@ -143,7 +143,13 @@ void Discreet3DSImporter::SetupProperties(const Importer * /*pImp*/) {
|
|
|
// Imports the given file into the given scene structure.
|
|
|
void Discreet3DSImporter::InternReadFile(const std::string &pFile,
|
|
|
aiScene *pScene, IOSystem *pIOHandler) {
|
|
|
- StreamReaderLE theStream(pIOHandler->Open(pFile, "rb"));
|
|
|
+
|
|
|
+ auto theFile = pIOHandler->Open(pFile, "rb");
|
|
|
+ if (!theFile) {
|
|
|
+ throw DeadlyImportError("3DS: Could not open ", pFile);
|
|
|
+ }
|
|
|
+
|
|
|
+ StreamReaderLE theStream(theFile);
|
|
|
|
|
|
// We should have at least one chunk
|
|
|
if (theStream.GetRemainingSize() < 16) {
|