avoid NULL, just in case

(loader might just probably crash anyway)
pull/326/head
Gargaj 2014-08-07 08:25:10 +02:00
parent 523d87bbe7
commit 7925dcadba
1 changed files with 5 additions and 2 deletions

View File

@ -642,8 +642,11 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
// Get file size for progress handler // Get file size for progress handler
IOStream * fileIO = pimpl->mIOHandler->Open( pFile ); IOStream * fileIO = pimpl->mIOHandler->Open( pFile );
if (fileIO)
{
uint32_t fileSize = fileIO->FileSize(); uint32_t fileSize = fileIO->FileSize();
pimpl->mIOHandler->Close( fileIO ); pimpl->mIOHandler->Close( fileIO );
}
// Dispatch the reading to the worker class for this format // Dispatch the reading to the worker class for this format
DefaultLogger::get()->info("Found a matching importer for this file format"); DefaultLogger::get()->info("Found a matching importer for this file format");