From 46cf2fc0867681c54aa8b55920e72a84e3bd1342 Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Sun, 5 May 2024 18:32:03 +1200 Subject: [PATCH] Import: Fix Application Hang when Cancelling the Download Dialogue. Fix a bug causing the 'Download from dive computer' dialogue to hang when the user attempts to cancel the dialogue after successfully downloading one or more dives. Fixes #4176. Signed-off-by: Michael Keller --- core/divelog.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/divelog.cpp b/core/divelog.cpp index ce8d3c2f0..b25e461c6 100644 --- a/core/divelog.cpp +++ b/core/divelog.cpp @@ -66,8 +66,7 @@ struct divelog &divelog::operator=(divelog &&log) void divelog::clear() { - while (dives->nr) - delete_single_dive(0); + clear_dive_table(dives); while (sites->nr) delete_dive_site(get_dive_site(0, sites), sites); if (trips->nr != 0) {