forked from Mirrorlandia_minetest/minetest
Handle mesh load failure without crashing
This commit is contained in:
parent
f213376b35
commit
cff35cf0b3
@ -1921,6 +1921,8 @@ scene::IAnimatedMesh* Client::getMesh(const std::string &filename, bool cache)
|
||||
|
||||
scene::IAnimatedMesh *mesh = RenderingEngine::get_scene_manager()->getMesh(rfile);
|
||||
rfile->drop();
|
||||
if (!mesh)
|
||||
return nullptr;
|
||||
mesh->grab();
|
||||
if (!cache)
|
||||
RenderingEngine::get_mesh_cache()->removeMesh(mesh);
|
||||
|
Loading…
Reference in New Issue
Block a user