Fix SEGV configChanged after athlete closed

.. the views were not being deleted, so the global context connection
   to configChanged signal was still called, but the athlete and
   context were long gone - so SEGV (!)

.. the reason this didn't get triggered in earlier releases is due to
   the fact the event was disconnected when the athlete context was
   deleted.
This commit is contained in:
Mark Liversedge
2020-08-14 13:43:41 +01:00
parent 9bb1f3434d
commit 80ba487153
4 changed files with 38 additions and 16 deletions

View File

@@ -1802,6 +1802,9 @@ MainWindow::removeTab(Tab *tab)
if (tabList.count() == 2) showTabbar(false); // don't need it for one!
// cancel ridecache refresh if its in progress
tab->context->athlete->rideCache->cancel();
// save the named searches
tab->context->athlete->namedSearches->write();