From d753b4c529b94fb5be840ea857b45bb6f78bbb0a Mon Sep 17 00:00:00 2001 From: vsv Date: Thu, 28 Apr 2016 19:15:09 +0300 Subject: [PATCH] Issue #1474: Fix the error --- src/XGUI/XGUI_DataModel.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/XGUI/XGUI_DataModel.cpp b/src/XGUI/XGUI_DataModel.cpp index ebf1db998..3fa9d63a5 100644 --- a/src/XGUI/XGUI_DataModel.cpp +++ b/src/XGUI/XGUI_DataModel.cpp @@ -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(); -- 2.39.2