summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/subsurfacewebservices.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/subsurfacewebservices.cpp')
-rw-r--r--desktop-widgets/subsurfacewebservices.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/desktop-widgets/subsurfacewebservices.cpp b/desktop-widgets/subsurfacewebservices.cpp
index 2acc7451e..d62cd8552 100644
--- a/desktop-widgets/subsurfacewebservices.cpp
+++ b/desktop-widgets/subsurfacewebservices.cpp
@@ -484,6 +484,10 @@ void DivelogsDeWebServices::prepareDivesForUpload(bool selected)
{
/* generate a random filename and create/open that file with zip_open */
QString filename = QDir::tempPath() + "/import-" + QString::number(qrand() % 99999999) + ".dld";
+ if (!amount_selected) {
+ report_error(tr("no dives were selected").toUtf8());
+ return;
+ }
if (prepare_dives_for_divelogs(filename, selected)) {
QFile f(filename);
if (f.open(QIODevice::ReadOnly)) {