From: David Faure Date: Fri, 18 Sep 2009 17:00:30 +0000 (+0000) Subject: Fix crash when changing view modes (view creation -> openurl -> clear -> update statu... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/1b160aee92af8bd215f88f524683c7214f497f90 Fix crash when changing view modes (view creation -> openurl -> clear -> update statusbar text -> accessing view, which is NULL) svn path=/trunk/KDE/kdebase/apps/; revision=1025401 --- diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 85bc21c77..568258168 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -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()