fix crash ExpressionDelegate::paint

This commit is contained in:
wmayer
2017-04-20 22:31:18 +02:00
parent fa4bebf2e0
commit 1b81ffaaaf

View File

@@ -331,7 +331,7 @@ protected:
options.widget->style()->drawControl(QStyle::CE_ItemViewItem, &options, painter);
ConstraintItem * item = dynamic_cast<ConstraintItem*>(view->item(index.row()));
if (!item)
if (!item || item->sketch->Constraints.getSize() < item->ConstraintNbr)
return;
App::ObjectIdentifier path = item->sketch->Constraints.createPath(item->ConstraintNbr);