From bf55da55bf9ceb61c3e881e5af5611c9d9c6f1af Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Tue, 12 Sep 2023 20:33:39 -0700 Subject: [PATCH] fix segfault on insufficient level for game creation --- src/ReceiveCommands.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ReceiveCommands.cc b/src/ReceiveCommands.cc index 46602e79..4309b93f 100644 --- a/src/ReceiveCommands.cc +++ b/src/ReceiveCommands.cc @@ -3424,7 +3424,7 @@ static void on_0C_C1_E7_EC(shared_ptr s, shared_ptr c, game = create_game_generic( s, c, name.c_str(), password.c_str(), episode, mode, cmd.difficulty, flags, watched_lobby); - if (game->episode == Episode::EP3) { + if (game && (game->episode == Episode::EP3)) { game->ep3_ex_result_values = s->ep3_default_ex_values; } }