mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
UserChart Scaling causes crash
.. when moving the scaling slider the charts get updated immediately, this causes a SEGV as charts are deleted whilst they are being updated. .. we now block updates whilst critical processing is happenning to avoid this. Fixes #4026
This commit is contained in:
@@ -947,8 +947,13 @@ UserChartSettings::refreshChartInfo()
|
||||
void
|
||||
UserChartSettings::updateChartInfo()
|
||||
{
|
||||
static bool blocked=false;
|
||||
|
||||
// if refresh chart info is updating, just ignore for now...
|
||||
if (updating) return;
|
||||
if (blocked || updating) return;
|
||||
|
||||
// don't interrupt as charts get zapped too soon...
|
||||
blocked = true;
|
||||
|
||||
bool refresh=true;
|
||||
|
||||
@@ -965,6 +970,8 @@ UserChartSettings::updateChartInfo()
|
||||
|
||||
// we need to refresh whenever stuff changes....
|
||||
if (refresh) emit chartConfigChanged();
|
||||
|
||||
blocked = false; // now we can process another...
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user