Skip to content
Snippets Groups Projects
Commit a338b3b8 authored by Martin Heistermann's avatar Martin Heistermann
Browse files

fix new bug: allow PluginFunctions::getObject() to fail without crashing.

parent bf5b1a64
Branches
No related tags found
1 merge request!5trust object type and avoid dynamic_cast due to cross-library RTTI trouble.
......@@ -108,7 +108,7 @@ bool getObject( int _identifier, HexahedralMeshObject*& _object ) {
BaseObjectData* object = 0;
PluginFunctions::getObject(_identifier,object);
_object = hexahedralMeshObject(object);
_object = object ? hexahedralMeshObject(object) : nullptr;
return ( _object != 0 );
}
......
......@@ -108,7 +108,7 @@ bool getObject( int _identifier, PolyhedralMeshObject*& _object ) {
BaseObjectData* object = 0;
PluginFunctions::getObject(_identifier,object);
_object = polyhedralMeshObject(object);
_object = object ? polyhedralMeshObject(object) : nullptr;
return ( _object != 0 );
}
......
......@@ -102,7 +102,7 @@ bool getObject( int _identifier, TetrahedralMeshObject*& _object ) {
BaseObjectData* object = 0;
PluginFunctions::getObject(_identifier,object);
_object = tetrahedralMeshObject(object);
_object = object ? tetrahedralMeshObject(object) : nullptr;
return ( _object != 0 );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment