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 <github@ike.ch>
This commit is contained in:
Michael Keller 2024-05-05 18:32:03 +12:00 committed by bstoeger
parent 5ac1922d84
commit 46cf2fc086

View file

@ -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) {