diff --git a/src/graphics/irr_driver.cpp b/src/graphics/irr_driver.cpp index 5a8425e27..53d8c99d1 100644 --- a/src/graphics/irr_driver.cpp +++ b/src/graphics/irr_driver.cpp @@ -83,7 +83,7 @@ IrrDriver::~IrrDriver() scene::IAnimatedMesh *IrrDriver::getAnimatedMesh(const std::string &filename) { scene::IAnimatedMesh *m = m_scene_manager->getMesh(filename.c_str()); - setAllMaterialFlags(m); + if(m) setAllMaterialFlags(m); return m; } // getAnimatedMesh