Crash in vtkChartXY::RemovePlot
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
The following call to RemovePlotInstance crashes because of a NULL pointer dereference in vtkChartXY::RemovePlot():996
#include <vtkChartXY.h> #include <vtkContextScene.h> #include <vtkContextView.h> #include <vtkPlotLine.h>
int main() { vtkChartXY *chart = vtkChartXY::New(); vtkPlot *line = vtkPlotLine::New(); chart->AddPlot(line); chart->RemovePlotInstance(line); line->Delete(); chart->Delete(); return EXIT_SUCCESS; }
I'm attaching a patch that fixes it for me (based on tag v5.8.0).