From c6a176d94a8a1023c9dd5dc209248dd07e631bdb Mon Sep 17 00:00:00 2001 From: Derek Jamison Date: Thu, 23 Mar 2023 17:15:20 -0400 Subject: [PATCH] fix freq not available bug w/join w/o games. --- subghz/plugins/rock_paper_scissors/rock_paper_scissors.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subghz/plugins/rock_paper_scissors/rock_paper_scissors.c b/subghz/plugins/rock_paper_scissors/rock_paper_scissors.c index 2472c05..121fc06 100644 --- a/subghz/plugins/rock_paper_scissors/rock_paper_scissors.c +++ b/subghz/plugins/rock_paper_scissors/rock_paper_scissors.c @@ -1972,7 +1972,7 @@ int32_t rock_paper_scissors_app(void* p) { break; case InputKeyOk: 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. game_context->data->game_number = game->game_number; @@ -1984,7 +1984,7 @@ int32_t rock_paper_scissors_app(void* p) { } else { FURI_LOG_E(TAG, "Failed to aquire mutex."); } - } else { + } else if(game) { game_context->data->local_player = StateJoiningBadFrequency; } break;