in ViewProviderBody::updateData make sure a view provider exists
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user