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:
Mark Liversedge
2021-08-25 09:48:44 +01:00
parent 73d28661fa
commit cc8b6b114d

View File

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