Skip to content

Commit

Permalink
recovery: handle back button when navigating recovery logs
Browse files Browse the repository at this point in the history
Fixes the crash when a user presses a hardware back button
instead of the on screen menu item.

OPO-521
Change-Id: I579d2720cdf7256a269358d037582121425d7c25
  • Loading branch information
Scott Mertz authored and ryzenforce990 committed Sep 4, 2016
1 parent 60fb71f commit d35a865
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion recovery.cpp
Expand Up @@ -1058,7 +1058,8 @@ static void choose_recovery_file(Device* device) {

while (true) {
int chosen_item = get_menu_selection(headers, entries, 1, 0, device);
if (strcmp(entries[chosen_item], "Back") == 0) break;
if (chosen_item == Device::kGoBack) break;
if (chosen_item >= 0 && strcmp(entries[chosen_item], "Back") == 0) break;

ui->ShowFile(entries[chosen_item]);
}
Expand Down

0 comments on commit d35a865

Please sign in to comment.