diff --git a/source/main/terrain/TerrainObjectManager.cpp b/source/main/terrain/TerrainObjectManager.cpp index b97695e3b6..9b1eefedd5 100644 --- a/source/main/terrain/TerrainObjectManager.cpp +++ b/source/main/terrain/TerrainObjectManager.cpp @@ -657,6 +657,14 @@ void TerrainObjectManager::LoadTerrainObject(const Ogre::String& name, const Ogr for (ODefCollisionMesh& cmesh : odef->collision_meshes) { + if (cmesh.mesh_name == "") + { + App::GetConsole()->putMessage( + Console::CONSOLE_MSGTYPE_TERRN, Console::CONSOLE_SYSTEM_WARNING, + "ODEF: Skipping collision mesh with empty name"); + continue; + } + auto gm = terrainManager->GetCollisions()->getGroundModelByString(cmesh.groundmodel_name); terrainManager->GetCollisions()->addCollisionMesh( cmesh.mesh_name, pos, tenode->getOrientation(),