]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphincontextmenu.cpp
The space info widget now inherits KCapacityBar. Two things to check:
[dolphin.git] / src / dolphincontextmenu.cpp
index b2ec59e1547e392d662fba90f4773019b639ef8f..1af74b2e31715f0034ba6e8f8c01da5d9c9c137a 100644 (file)
@@ -337,7 +337,8 @@ QString DolphinContextMenu::placesName(const KUrl& url) const
 QAction* DolphinContextMenu::createPasteAction()
 {
     QAction* action = 0;
-    if ((m_selectedItems.count() == 1) && m_fileInfo.isDir()) {
+    const bool isDir = !m_fileInfo.isNull() && m_fileInfo.isDir();
+    if (isDir && (m_selectedItems.count() == 1)) {
         action = new QAction(KIcon("edit-paste"), i18nc("@action:inmenu", "Paste Into Folder"), this);
         const QMimeData* mimeData = QApplication::clipboard()->mimeData();
         const KUrl::List pasteData = KUrl::List::fromMimeData(mimeData);