fix freq not available bug w/join w/o games.

This commit is contained in:
Derek Jamison 2023-03-23 17:15:20 -04:00
parent 2fa4067702
commit c6a176d94a

View File

@ -1972,7 +1972,7 @@ int32_t rock_paper_scissors_app(void* p) {
break; break;
case InputKeyOk: case InputKeyOk:
game = remote_games_current(game_context); game = remote_games_current(game_context);
if(update_frequency(game_context) && game) { if(game && update_frequency(game_context)) {
// We send "Join" when OK button clicked. // We send "Join" when OK button clicked.
game_context->data->game_number = game->game_number; game_context->data->game_number = game->game_number;
@ -1984,7 +1984,7 @@ int32_t rock_paper_scissors_app(void* p) {
} else { } else {
FURI_LOG_E(TAG, "Failed to aquire mutex."); FURI_LOG_E(TAG, "Failed to aquire mutex.");
} }
} else { } else if(game) {
game_context->data->local_player = StateJoiningBadFrequency; game_context->data->local_player = StateJoiningBadFrequency;
} }
break; break;