Skip to content

Commit

Permalink
[statistics] Fix use of uninitialized variable
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielNumworks authored and EmilieNumworks committed Jan 5, 2021
1 parent f449db6 commit d022231
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/statistics/histogram_parameter_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ HistogramParameterController::HistogramParameterController(Responder * parentRes

void HistogramParameterController::viewWillAppear() {
// Initialize temporary parameters to the extracted value.
/* setParameterAtIndex uses the value of the other parameter, so we need to
* manually set the value of the second parameter before the first call. */
double parameterAtIndex1 = extractParameterAtIndex(1);
m_tempFirstDrawnBarAbscissa = parameterAtIndex1;
setParameterAtIndex(0, extractParameterAtIndex(0));
setParameterAtIndex(1, extractParameterAtIndex(1));
setParameterAtIndex(1, parameterAtIndex1);
FloatParameterController::viewWillAppear();
}

Expand Down

0 comments on commit d022231

Please sign in to comment.