summaryrefslogtreecommitdiffstats
path: root/kioslave/media/mediaimpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kioslave/media/mediaimpl.cpp')
-rw-r--r--kioslave/media/mediaimpl.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/kioslave/media/mediaimpl.cpp b/kioslave/media/mediaimpl.cpp
index fb9e01480..b55b37e5d 100644
--- a/kioslave/media/mediaimpl.cpp
+++ b/kioslave/media/mediaimpl.cpp
@@ -281,6 +281,13 @@ bool MediaImpl::ensureMediumMounted(Medium &medium)
return m_lastErrorCode==0;
}
+ if (medium.id().isEmpty())
+ {
+ m_lastErrorCode = KIO::ERR_COULD_NOT_MOUNT;
+ m_lastErrorMessage = i18n("No such medium.");
+ return false;
+ }
+
return true;
}