Commit 55690527 authored by Jan Möbius's avatar Jan Möbius

Fixed crash on Histogram computation with no bins

parent a044df05
......@@ -78,7 +78,8 @@ void QtHistogramWidget::paintEvent(QPaintEvent *event) {
const std::vector<double> &bin_widths = histogram_->getBinWidths();
const double total_width = histogram_->getTotalWidth();
const size_t hist_max = *std::max_element(bins.begin(), bins.end());
size_t hist_max = bins.size() > 0 ? *std::max_element(bins.begin(), bins.end()) : 0;
/*
* Establish regions
......
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