Merge branch 'master' into jc3-spam-killa

pull/3881/head
Jason C 2021-05-09 14:41:39 -04:00 committed by GitHub
commit 5cc05c26a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ bool M3DImporter::CanRead(const std::string &pFile, IOSystem *pIOHandler, bool c
*/ */
std::unique_ptr<IOStream> pStream(pIOHandler->Open(pFile, "rb")); std::unique_ptr<IOStream> pStream(pIOHandler->Open(pFile, "rb"));
unsigned char data[4]; unsigned char data[4];
if (4 != pStream->Read(data, 1, 4)) { if (!pStream || 4 != pStream->Read(data, 1, 4)) {
return false; return false;
} }
return !memcmp(data, "3DMO", 4) /* bin */ return !memcmp(data, "3DMO", 4) /* bin */