From 630a5cb3a1183bab0e914fb82fd6658917250409 Mon Sep 17 00:00:00 2001 From: vsv Date: Mon, 12 May 2014 11:38:10 +0400 Subject: [PATCH] Avoid crash on creation of sketch line finish --- src/XGUI/XGUI_DocumentDataModel.cpp | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.39.2