From f483a1a9b2ea85272ce20b9f1ecd24edc29343d1 Mon Sep 17 00:00:00 2001 From: Paramat Date: Wed, 9 Oct 2019 19:39:50 +0100 Subject: [PATCH] Fix isDead()/autoforward crash (#9031) Crash occurred in singleplayer when leaving a world with autoforward enabled then re-entering a world. --- src/client/game.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/game.cpp b/src/client/game.cpp index 028d2d3bd..450eb4e32 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -2481,7 +2481,8 @@ void Game::updatePlayerControl(const CameraOrientation &cam) } // autoforward if set: simulate "up" key - if (player->getPlayerSettings().continuous_forward && !player->isDead()) { + if (player->getPlayerSettings().continuous_forward && + client->activeObjectsReceived() && !player->isDead()) { control.up = true; keypress_bits |= 1U << 0; } -- 2.25.1