Fix crash on --no-python

.. if there is a python chart in the view, it will crash as setWeb
   does not check to see if embedding worked, and is called via the
   property system so must always check.
This commit is contained in:
Mark Liversedge
2020-05-02 14:07:57 +01:00
parent 211b9b23cd
commit d042ec591e

View File

@@ -418,6 +418,9 @@ PythonChart::PythonChart(Context *context, bool ridesummary) : GcChartWindow(con
void
PythonChart::setWeb(bool x)
{
// check python was loaded
if (python == NULL || python->loaded == false) return;
// toggle the use of a web chart or a qt chart for rendering the data
if (x && canvas==NULL) {