diff options
Diffstat (limited to 'qt-ui/subsurfacewebservices.cpp')
-rw-r--r-- | qt-ui/subsurfacewebservices.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp index c0091fc03..619714dee 100644 --- a/qt-ui/subsurfacewebservices.cpp +++ b/qt-ui/subsurfacewebservices.cpp @@ -100,6 +100,12 @@ static void clear_table(struct dive_table *table) static char *prepare_dives_for_divelogs(const bool selected) { + const QString errPrefix("divelog.de-upload:"); + if (!amount_selected) { + qDebug() << errPrefix << "no dives selected"; + return NULL; + } + int i; struct dive *dive; FILE *f; @@ -111,7 +117,6 @@ static char *prepare_dives_for_divelogs(const bool selected) xmlDoc *transformed; struct zip_source *s[dive_table.nr]; struct zip *zip; - const QString errPrefix("divelog.de-upload:"); /* generate a random filename and create/open that file with zip_open */ QString tempfileQ = QDir::tempPath() + "/import-" + QString::number(qrand() % 99999999) + ".dld"; @@ -123,11 +128,6 @@ static char *prepare_dives_for_divelogs(const bool selected) free((void *)tempfile); return NULL; } - if (!amount_selected) { - qDebug() << errPrefix << "no dives selected"; - free((void *)tempfile); - return NULL; - } /* walk the dive list in chronological order */ for (i = 0; i < dive_table.nr; i++) { |