Prevent crash when Ogre skeleton file is missing

pull/2502/head
Arkeon 2019-06-07 09:49:24 +02:00
parent 83237de02f
commit 5679dd435a
1 changed files with 2 additions and 0 deletions

View File

@ -864,6 +864,8 @@ bool OgreBinarySerializer::ImportSkeleton(Assimp::IOSystem *pIOHandler, Mesh *me
}
MemoryStreamReaderPtr reader = OpenReader(pIOHandler, mesh->skeletonRef);
if (!reader)
return false;
Skeleton *skeleton = new Skeleton();
OgreBinarySerializer serializer(reader.get(), OgreBinarySerializer::AM_Skeleton);