┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/dolphinview.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2012-04-27 09:28:00 +0200
committerPeter Penz <[email protected]>2012-04-27 09:31:57 +0200
commit0a00f13bf246d37182dafcd053776048f63d2299 (patch)
treeacd5655d939c413960b20d037d8da89037a756ab /src/views/dolphinview.cpp
parentd1c5dc52a3ac4f83262d00d37a61f6bfb52d5bf4 (diff)
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
Diffstat (limited to 'src/views/dolphinview.cpp')
-rw-r--r--src/views/dolphinview.cpp4
1 files changed, 3 insertions, 1 deletions
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<QAction*> 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);
}