attempt to fix random crash in boards

This commit is contained in:
csoler 2021-02-08 23:14:43 +01:00
parent e59ba49240
commit 7a4bd87fe9

View File

@ -42,7 +42,7 @@ void RSTreeView::mouseMoveEvent(QMouseEvent *e)
{
QModelIndex idx = indexAt(e->pos());
if(idx != selectionModel()->currentIndex())
if(idx.isValid() && idx != selectionModel()->currentIndex())
selectionModel()->setCurrentIndex(idx,QItemSelectionModel::ClearAndSelect);
QTreeView::mouseMoveEvent(e);