From 0a00f13bf246d37182dafcd053776048f63d2299 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Fri, 27 Apr 2012 09:28:00 +0200 Subject: Never pass null-items to version-control-plugins Some plugins are not prepared for this and might crash. Although the additional check in VersionControlObserver::actions() should not be necessary because of the fix in DolphinView, it is left here to catch potential other cases where a null-item might get passed accidently. Thanks to Ilya for initially patching the Box-plugin which gave a hint whats going wrong. BUG: 294336 FIXED-IN: 4.9.0 --- src/views/dolphinview.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/views/dolphinview.cpp') diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index d21743bf4..2f744386f 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -559,7 +559,9 @@ QList DolphinView::versionControlActions(const KFileItemList& items) c if (items.isEmpty()) { const KFileItem item = m_model->rootItem(); - actions = m_versionControlObserver->actions(KFileItemList() << item); + if (!item.isNull()) { + actions = m_versionControlObserver->actions(KFileItemList() << item); + } } else { actions = m_versionControlObserver->actions(items); } -- cgit v1.3