Skip to content

Commit

Permalink
Fix rare crash when closing PerfMenu after returning from step edit.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmamma committed Jul 31, 2023
1 parent 178a27c commit d2dda19
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions avr/cores/megacommand/MCL/PerfPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,13 +611,15 @@ bool PerfPage::handleEvent(gui_event_t *event) {
return true;
}
if (EVENT_RELEASED(event, Buttons.BUTTON3)) {
if (show_menu) {
void (*row_func)() =
perf_menu_page.menu.get_row_function(perf_menu_page.encoders[1]->cur);
if (row_func != NULL) {
DEBUG_PRINTLN("calling menu func");
(*row_func)();
}
init();
}
return true;
}

Expand Down

0 comments on commit d2dda19

Please sign in to comment.