diff options
Diffstat (limited to 'Swift/QtUI/Roster/RosterModel.cpp')
| -rw-r--r-- | Swift/QtUI/Roster/RosterModel.cpp | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/Swift/QtUI/Roster/RosterModel.cpp b/Swift/QtUI/Roster/RosterModel.cpp index 8a319ea..568c1f5 100644 --- a/Swift/QtUI/Roster/RosterModel.cpp +++ b/Swift/QtUI/Roster/RosterModel.cpp @@ -58,7 +58,8 @@ QModelIndex RosterModel::parent(const QModelIndex& index) const {  	Q_ASSERT(item);  	QtTreeWidgetItem* parentItem = item->getParentItem(); -	return parentItem == tree_ ? QModelIndex() : createIndex(parentItem->row(), 0, parentItem); +	/* parentItem_ == NULL can happen during destruction.*/ +	return parentItem == tree_ || parentItem == NULL ? QModelIndex() : createIndex(parentItem->row(), 0, parentItem);  }  | 
 Swift