From: Paramat Date: Wed, 9 Oct 2019 18:39:50 +0000 (+0100) Subject: Fix isDead()/autoforward crash (#9031) X-Git-Tag: 5.1.0~4 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f483a1a9b2ea85272ce20b9f1ecd24edc29343d1;p=oweals%2Fminetest.git Fix isDead()/autoforward crash (#9031) Crash occurred in singleplayer when leaving a world with autoforward enabled then re-entering a world. --- 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; }