aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-12-30 00:50:50 +0100
committerest31 <MTest31@outlook.com>2015-12-30 00:50:50 +0100
commita142e4f4b2256e7c4a16d14aecde6e04be33457c (patch)
tree2500af46290b924032facaf151fa9639076d1b03
parent9719aded5430dd57591310c9cae06944dc345d42 (diff)
downloadminetest-a142e4f4b2256e7c4a16d14aecde6e04be33457c.tar.gz
minetest-a142e4f4b2256e7c4a16d14aecde6e04be33457c.tar.bz2
minetest-a142e4f4b2256e7c4a16d14aecde6e04be33457c.zip
Fix client crashing when connecting to server
My commit e2d54c9f9275e4f77ec33be8054621d42945f7a4 "shutdown when requested from lua in singleplayer too" broke minetest's feature to connect to servers. The client crashed after the connection init was complete. Thanks to @sofar for reporting the bug. Fixes #3498.
-rw-r--r--src/game.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 25424fa26..7ada1791e 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -1818,7 +1818,7 @@ void Game::run()
while (device->run()
&& !(*kill || g_gamecallback->shutdown_requested
- || server->getShutdownRequested())) {
+ || (server && server->getShutdownRequested()))) {
/* Must be called immediately after a device->run() call because it
* uses device->getTimer()->getTime()