Skip to content

Commit 60fb615

Browse files
committed
fix crash
1 parent c145a3a commit 60fb615

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/OpenCOVER/plugins/general/Earth/EarthPlugin.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,12 @@ void EarthPlugin::tabletEvent(coTUIElement *e)
260260

261261
const osgEarth::SpatialReference *EarthPlugin::getSRS() const
262262
{
263+
if (!mapNode)
264+
return nullptr;
265+
if (!mapNode->getMap())
266+
return nullptr;
267+
if (!mapNode->getMap()->getProfile())
268+
return nullptr;
263269
return mapNode->getMap()->getProfile()->getSRS();
264270
}
265271

0 commit comments

Comments
 (0)