Skip to content
Snippets Groups Projects
Commit d89222c6 authored by Pete Peterson's avatar Pete Peterson Committed by GitHub
Browse files

Merge pull request #18771 from mantidproject/fix_splatter_plot_init_zero_boxes

VSI: Fix crash in splatter plot view 
parents f9ab32c5 a918b772
No related branches found
No related tags found
No related merge requests found
...@@ -116,7 +116,7 @@ void vtkSplatterPlotFactory::doCreate( ...@@ -116,7 +116,7 @@ void vtkSplatterPlotFactory::doCreate(
} }
size_t num_boxes_to_use = static_cast<size_t>( size_t num_boxes_to_use = static_cast<size_t>(
m_percentToUse * static_cast<double>(m_sortedBoxes.size()) / 100.0); 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; num_boxes_to_use = m_sortedBoxes.size() - 1;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment