Salome HOME
Issue #1474: Fix the error
authorvsv <vitaly.smetannikov@opencascade.com>
Thu, 28 Apr 2016 16:15:09 +0000 (19:15 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Thu, 28 Apr 2016 16:15:09 +0000 (19:15 +0300)
src/XGUI/XGUI_DataModel.cpp

index ebf1db998f9d98d129d7989d172e3c92834a86b6..3fa9d63a5f54273bd569611d5b7a711b6fde05d3 100644 (file)
@@ -599,6 +599,8 @@ QModelIndex XGUI_DataModel::index(int theRow, int theColumn, const QModelIndex &
 static QModelIndex MYLastDeleted;
 QModelIndex XGUI_DataModel::parent(const QModelIndex& theIndex) const
 {
+  if (!theIndex.isValid())
+    return QModelIndex();
   // To avoid additional request about index which was already deleted
   if (theIndex == MYLastDeleted)
     return QModelIndex();