From d042ec591efcc689468bd9ca1e9ab7c5f74af7d9 Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Sat, 2 May 2020 14:07:57 +0100 Subject: [PATCH] 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. --- src/Charts/PythonChart.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Charts/PythonChart.cpp b/src/Charts/PythonChart.cpp index 23b876e84..c5abf35f8 100644 --- a/src/Charts/PythonChart.cpp +++ b/src/Charts/PythonChart.cpp @@ -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) {