Skip to content

Commit

Permalink
in ViewProviderBody::updateData make sure a view provider exists
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Feb 9, 2018
1 parent d455600 commit d5c890c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Mod/PartDesign/Gui/ViewProviderBody.cpp
Expand Up @@ -233,9 +233,9 @@ void ViewProviderBody::updateData(const App::Property* prop)
auto features = body->Group.getValues();

// restore icons
for ( auto feature : features) {
for (auto feature : features) {
Gui::ViewProvider* vp = Gui::Application::Instance->activeDocument()->getViewProvider(feature);
if(vp->isDerivedFrom(PartDesignGui::ViewProvider::getClassTypeId())) {
if (vp && vp->isDerivedFrom(PartDesignGui::ViewProvider::getClassTypeId())) {
static_cast<PartDesignGui::ViewProvider*>(vp)->setTipIcon(feature == tip);
}
}
Expand Down

0 comments on commit d5c890c

Please sign in to comment.