diff --git a/Vates/VatesAPI/src/vtkSplatterPlotFactory.cpp b/Vates/VatesAPI/src/vtkSplatterPlotFactory.cpp index a65b23f0e0039334f001063c8bb50496d92ce144..187ee5e01c0236b3d397a85a596377b0f4ccd254 100644 --- a/Vates/VatesAPI/src/vtkSplatterPlotFactory.cpp +++ b/Vates/VatesAPI/src/vtkSplatterPlotFactory.cpp @@ -116,7 +116,7 @@ void vtkSplatterPlotFactory::doCreate( } size_t num_boxes_to_use = static_cast<size_t>( m_percentToUse * static_cast<double>(m_sortedBoxes.size()) / 100.0); - if (num_boxes_to_use >= m_sortedBoxes.size()) { + if (num_boxes_to_use > 0 && num_boxes_to_use >= m_sortedBoxes.size()) { num_boxes_to_use = m_sortedBoxes.size() - 1; }