From: vsv Date: Mon, 12 May 2014 07:38:10 +0000 (+0400) Subject: Avoid crash on creation of sketch line finish X-Git-Tag: V_0.2~75 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=630a5cb3a1183bab0e914fb82fd6658917250409;p=modules%2Fshaper.git Avoid crash on creation of sketch line finish --- diff --git a/src/XGUI/XGUI_DocumentDataModel.cpp b/src/XGUI/XGUI_DocumentDataModel.cpp index 079986bc5..719b6f466 100644 --- a/src/XGUI/XGUI_DocumentDataModel.cpp +++ b/src/XGUI/XGUI_DocumentDataModel.cpp @@ -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)