From 1b160aee92af8bd215f88f524683c7214f497f90 Mon Sep 17 00:00:00 2001 From: David Faure Date: Fri, 18 Sep 2009 17:00:30 +0000 Subject: 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 --- src/dolphinview.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/dolphinview.cpp') 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() -- cgit v1.3