]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix crash when changing view modes (view creation -> openurl -> clear -> update statu...
authorDavid Faure <faure@kde.org>
Fri, 18 Sep 2009 17:00:30 +0000 (17:00 +0000)
committerDavid Faure <faure@kde.org>
Fri, 18 Sep 2009 17:00:30 +0000 (17:00 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=1025401

src/dolphinview.cpp

index 85bc21c771579384dc0bfc10992d40f12b4dbd64..56825816828629936df345cd508124c4f82b87eb 100644 (file)
@@ -309,7 +309,8 @@ void DolphinView::invertSelection()
 
 bool DolphinView::hasSelection() const
 {
-    return m_viewAccessor.itemView()->selectionModel()->hasSelection();
+    const QAbstractItemView* view = m_viewAccessor.itemView();
+    return view && view->selectionModel()->hasSelection();
 }
 
 void DolphinView::clearSelection()