diff --git a/CHANGELOG.md b/CHANGELOG.md index 939dc2ea2..e6b10ea08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +- avoid potential crash when switching divelogs - add GPS fix downloaded from a dive comuter to existing dive site - fix broken curser left/right shortcut for showing multiple dive computers - allow editing the profile for dives imported without samples (via CSV) diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index 55a00a8e8..e296a8b9b 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -1078,7 +1078,11 @@ void ProfileWidget2::setEmptyState() hideAll(allPercentages); hideAll(handles); #endif - hideAll(eventItems); + // the events will have connected slots which can fire after + // the dive and its data have been deleted - so explictly delete + // the DiveEventItems + qDeleteAll(eventItems); + eventItems.clear(); hideAll(gases); }