when drawing constraint icon handle the case when view provider of sketch is not in sync with geometry

This commit is contained in:
wmayer
2017-06-02 11:13:03 +02:00
parent d8e2f8c221
commit e73a16e7b4

View File

@@ -2796,6 +2796,12 @@ void ViewProviderSketch::drawConstraintIcons()
break;
}
// Double-check that we can safely access the Inventor nodes
if (constrId >= edit->constrGroup->getNumChildren()) {
Base::Console().Warning("Can't update constraint icons because view is not in sync with sketch\n");
break;
}
// Find the Constraint Icon SoImage Node
SoSeparator *sep = static_cast<SoSeparator *>(edit->constrGroup->getChild(constrId));