Commit e06be20d authored by Dave Demarle's avatar Dave Demarle
Browse files

BUG: Prevent XYPlotActor from crashing when it is given an inputs with no...

BUG: Prevent XYPlotActor from crashing when it is given an inputs with no points. This is a partial fix for the ProbePoint-batch test.
parent b1df1f28
......@@ -39,7 +39,7 @@
#define VTK_MAX_PLOTS 50
vtkCxxRevisionMacro(vtkXYPlotActor, "1.59");
vtkCxxRevisionMacro(vtkXYPlotActor, "1.60");
vtkStandardNewMacro(vtkXYPlotActor);
vtkCxxSetObjectMacro(vtkXYPlotActor,TitleTextProperty,vtkTextProperty);
......@@ -970,6 +970,11 @@ void vtkXYPlotActor::ComputeXRange(double range[2], double *lengths)
(ds = this->InputList->GetNextDataSet(dsit)); dsNum++)
{
numPts = ds->GetNumberOfPoints();
if (numPts == 0)
{
vtkErrorMacro(<<"No scalar data to plot!");
continue;
}
if ( this->XValues != VTK_XYPLOT_INDEX )
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment