Salome HOME
Avoid crash on creation of sketch line finish
authorvsv <vitaly.smetannikov@opencascade.com>
Mon, 12 May 2014 07:38:10 +0000 (11:38 +0400)
committervsv <vitaly.smetannikov@opencascade.com>
Mon, 12 May 2014 07:38:10 +0000 (11:38 +0400)
src/XGUI/XGUI_DocumentDataModel.cpp

index 079986bc5134d7e36d7850132776ee27a9639101..719b6f466d2dcb19e14eb6c49dc3a50d0e4bf253 100644 (file)
@@ -159,6 +159,8 @@ QVariant XGUI_DocumentDataModel::data(const QModelIndex& theIndex, int theRole)
     {
       int aOffset = historyOffset();
       FeaturePtr aFeature = myDocument->feature(FEATURES_GROUP, theIndex.row() - aOffset);
+      if (!aFeature)
+        return QVariant();
       switch (theRole) {
       case Qt::DisplayRole:
         if (aFeature)