Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
55690527
Commit
55690527
authored
Jun 19, 2018
by
Jan Möbius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed crash on Histogram computation with no bins
parent
a044df05
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
libs_required/ACG/QtWidgets/QtHistogramWidget.cc
libs_required/ACG/QtWidgets/QtHistogramWidget.cc
+2
-1
No files found.
libs_required/ACG/QtWidgets/QtHistogramWidget.cc
View file @
55690527
...
...
@@ -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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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