diff --git a/source/Irrlicht/CB3DMeshFileLoader.cpp b/source/Irrlicht/CB3DMeshFileLoader.cpp index 2f18257d..05f8bf5d 100644 --- a/source/Irrlicht/CB3DMeshFileLoader.cpp +++ b/source/Irrlicht/CB3DMeshFileLoader.cpp @@ -136,7 +136,8 @@ bool CB3DMeshFileLoader::load() else { os::Printer::log("Unknown chunk found in mesh base - skipping"); - B3DFile->seek(B3dStack.getLast().startposition + B3dStack.getLast().length); + if (!B3DFile->seek(B3dStack.getLast().startposition + B3dStack.getLast().length)) + return false; B3dStack.erase(B3dStack.size()-1); } } @@ -232,7 +233,8 @@ bool CB3DMeshFileLoader::readChunkNODE(CSkinnedMesh::SJoint *inJoint) else { os::Printer::log("Unknown chunk found in node chunk - skipping"); - B3DFile->seek(B3dStack.getLast().startposition + B3dStack.getLast().length); + if (!B3DFile->seek(B3dStack.getLast().startposition + B3dStack.getLast().length)) + return false; B3dStack.erase(B3dStack.size()-1); } } @@ -315,7 +317,8 @@ bool CB3DMeshFileLoader::readChunkMESH(CSkinnedMesh::SJoint *inJoint) else { os::Printer::log("Unknown chunk found in mesh - skipping"); - B3DFile->seek(B3dStack.getLast().startposition + B3dStack.getLast().length); + if (!B3DFile->seek(B3dStack.getLast().startposition + B3dStack.getLast().length)) + return false; B3dStack.erase(B3dStack.size()-1); } }