summaryrefslogtreecommitdiffstats
path: root/qt-ui/subsurfacewebservices.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/subsurfacewebservices.cpp')
-rw-r--r--qt-ui/subsurfacewebservices.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp
index 12531f6b3..5e7f016dd 100644
--- a/qt-ui/subsurfacewebservices.cpp
+++ b/qt-ui/subsurfacewebservices.cpp
@@ -382,8 +382,10 @@ void SubsurfaceWebServices::buttonClicked(QAbstractButton *button)
usedUuids.insert(d->dive_site_uuid);
}
for_each_dive_site(i, ds) {
- if (!usedUuids.contains(ds->uuid) && same_string(ds->notes, "SubsurfaceWebservice"))
+ if (!usedUuids.contains(ds->uuid) && same_string(ds->notes, "SubsurfaceWebservice")) {
delete_dive_site(ds->uuid);
+ i--; // otherwise we skip one site
+ }
}
} break;
case QDialogButtonBox::RejectRole: