From kde-commits Fri Oct 30 09:14:27 2015 From: Klaas Freitag Date: Fri, 30 Oct 2015 09:14:27 +0000 To: kde-commits Subject: [kraft/mark_sent] src: Do not crash if there is no selection model. Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=144619649303986 Git commit e82ffe78b03bd4adf8f1b612ab8f9e15b8c6a3bd by Klaas Freitag. Committed on 29/10/2015 at 08:04. Pushed by freitag into branch 'mark_sent'. Do not crash if there is no selection model. M +1 -1 src/docdigestview.cpp http://commits.kde.org/kraft/e82ffe78b03bd4adf8f1b612ab8f9e15b8c6a3bd diff --git a/src/docdigestview.cpp b/src/docdigestview.cpp index b43a388..6742092 100644 --- a/src/docdigestview.cpp +++ b/src/docdigestview.cpp @@ -300,7 +300,7 @@ void DocDigestView::slotUpdateView() int indx =3D mToolBox->currentIndex(); QAbstractItemView *view =3D mTreeViewIndex[indx]; QModelIndex row; - if( view ) { + if( view && view->selectionModel() ) { row =3D view->selectionModel()->selectedRows().at(0); } QApplication::setOverrideCursor( QCursor( Qt::WaitCursor ) );