Ver Fonte

[assbin] Fail if file could not be opened

Fail instead of returning empty scene.

Partially addresses #3888.
Jason C há 4 anos atrás
pai
commit
470913bf27
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      code/AssetLib/Assbin/AssbinLoader.cpp

+ 1 - 1
code/AssetLib/Assbin/AssbinLoader.cpp

@@ -671,7 +671,7 @@ void AssbinImporter::ReadBinaryScene(IOStream *stream, aiScene *scene) {
 void AssbinImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSystem *pIOHandler) {
 void AssbinImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSystem *pIOHandler) {
     IOStream *stream = pIOHandler->Open(pFile, "rb");
     IOStream *stream = pIOHandler->Open(pFile, "rb");
     if (nullptr == stream) {
     if (nullptr == stream) {
-        return;
+        throw DeadlyImportError("ASSBIN: Could not open ", pFile);
     }
     }
 
 
     // signature
     // signature