Skip to content

Commit

Permalink
Merge pull request #4 from alan-mushi/issue4
Browse files Browse the repository at this point in the history
connman_ncurses crashes when No suitable services are found in a technology and the user press enter
  • Loading branch information
jobol committed Feb 2, 2015
2 parents 50ec7b9 + 58569f8 commit 524cb15
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1275,6 +1275,10 @@ static void exec_action_context_home(int ch)
case KEY_ENTER:
case 10:
item = current_item(main_menu);

if (!item) // No technologies available but the user presses Enter
break;

exec_action(item_userptr(item));
break;
}
Expand Down Expand Up @@ -1398,6 +1402,10 @@ static void exec_action_context_services(int ch)
case KEY_ENTER:
case 10:
item = current_item(main_menu);

if (!item) // No services available but the user presses Enter
break;

exec_action(item_userptr(item));
print_info_in_footer(false, "Connecting...");
break;
Expand Down

0 comments on commit 524cb15

Please sign in to comment.