diff --git a/code/OgreBinarySerializer.cpp b/code/OgreBinarySerializer.cpp index b2326e244..589e69c7e 100644 --- a/code/OgreBinarySerializer.cpp +++ b/code/OgreBinarySerializer.cpp @@ -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);