┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/infosidebarpage.cpp
diff options
context:
space:
mode:
authorDavid Faure <[email protected]>2007-07-04 21:25:56 +0000
committerDavid Faure <[email protected]>2007-07-04 21:25:56 +0000
commit089f4745130f1d19e6720539feb8ac99d1043bda (patch)
tree3c6d11121a8371ddb1de9b975d95b92d1ac866cb /src/infosidebarpage.cpp
parent72109bb106177ede1cc9891afe3f117a5499aaac (diff)
Don't crash (in PreviewJob) when m_shownUrl is empty for some reason.
svn path=/trunk/KDE/kdebase/apps/; revision=683539
Diffstat (limited to 'src/infosidebarpage.cpp')
-rw-r--r--src/infosidebarpage.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/infosidebarpage.cpp b/src/infosidebarpage.cpp
index 1bdc67750..fb422ec89 100644
--- a/src/infosidebarpage.cpp
+++ b/src/infosidebarpage.cpp
@@ -160,12 +160,15 @@ void InfoSidebarPage::showItemInfo()
const KFileItemList& selectedItems = selection();
KUrl file;
- const int itemCount = selectedItems.count();
- if (selectedItems.count() == 0) {
+ if (selectedItems.isEmpty()) {
file = m_shownUrl;
} else {
file = selectedItems[0]->url();
}
+ if (!file.isValid()) {
+ return;
+ }
+ const int itemCount = selectedItems.count();
if (itemCount > 1) {
KIconLoader iconLoader;
QPixmap icon = iconLoader.loadIcon("exec",