Issue ID 0004230 : Fixing a crash in chamfer command. Putting a null check for the function return value

[skip ci]
This commit is contained in:
Rajendra Pardeshi
2019-12-26 23:38:24 +05:30
committed by wmayer
parent ae7ebde4e3
commit 28d67eba2e
2 changed files with 5 additions and 3 deletions

View File

@@ -786,7 +786,8 @@ void Document::slotChangedObject(const App::DocumentObject& Obj, const App::Prop
&& d->_editingObject
&& d->_editViewProviderParent
&& (Prop.isDerivedFrom(App::PropertyPlacement::getClassTypeId())
|| strstr(Prop.getName(),"Scale"))
// Issue ID 0004230 : getName() can return null in which case strstr() crashes
|| (Prop.getName() && strstr(Prop.getName(),"Scale")))
&& d->_editObjs.count(&Obj))
{
Base::Matrix4D mat;