Skip to content

Commit

Permalink
App: Bugfix for NULL-Pointer dereference of Property->getName()
Browse files Browse the repository at this point in the history
Some parts of FreeCAD use prop->getName() without testing
for NULL first, e.g.:

src/Mod/PartDesign/Gui/ViewProviderAddSub.cpp:258
 ViewProviderAddSub::updateData()
src/Mod/PartDesign/Gui/ViewProviderDatumCS.cpp:193
 ViewProviderDatumCoordinateSystem::updateData()

See also:
https://forum.freecadweb.org/viewtopic.php?f=3&t=58603
  • Loading branch information
Maurice Massar committed Jul 26, 2021
1 parent 41b0805 commit fa7e122
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/App/Property.cpp
Expand Up @@ -62,6 +62,8 @@ Property::~Property()

const char* Property::getName(void) const
{
if (myName == NULL)
return "?";
return myName;
}

Expand Down

0 comments on commit fa7e122

Please sign in to comment.