Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
7ef3c61d
Commit
7ef3c61d
authored
Jun 19, 2018
by
Jan Möbius
Browse files
Merge branch 'Fix_histogram_crash' into 'master'
Fixed crash on Histogram computation with no bins See merge request
!114
parents
a044df05
55690527
Changes
1
Hide whitespace changes
Inline
Side-by-side
libs_required/ACG/QtWidgets/QtHistogramWidget.cc
View file @
7ef3c61d
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment