diff options
Diffstat (limited to 'qt-ui/subsurfacewebservices.cpp')
-rw-r--r-- | qt-ui/subsurfacewebservices.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp index 5170b3a40..406939e6b 100644 --- a/qt-ui/subsurfacewebservices.cpp +++ b/qt-ui/subsurfacewebservices.cpp @@ -133,7 +133,9 @@ bool DivelogsDeWebServices::prepare_dives_for_divelogs(const QString &tempfile, } /* walk the dive list in chronological order */ - for (int i = 0; i < dive_table.nr; i++) { + int i; + struct dive *dive; + for_each_dive(i, dive) { FILE *f; char filename[PATH_MAX]; int streamsize; @@ -145,9 +147,6 @@ bool DivelogsDeWebServices::prepare_dives_for_divelogs(const QString &tempfile, * Get the i'th dive in XML format so we can process it. * We need to save to a file before we can reload it back into memory... */ - struct dive *dive = get_dive(i); - if (!dive) - continue; if (selected && !dive->selected) continue; f = tmpfile(); |