summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/game.cpp b/src/game.cpp
index b5e492ee5..0d239fa3e 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -153,12 +153,13 @@ static void initEngines()
#endif
crazyMoves = new CrazyMoves;
- particleEngine = new Particle();
+ particleEngine = new Particle;
particleEngine->setMap(nullptr);
particleEngine->setupEngine();
BeingInfo::init();
- gameHandler->initEngines();
+ if (gameHandler)
+ gameHandler->initEngines();
keyboard.update();
if (joystick)
@@ -195,7 +196,7 @@ static void createGuiWindows()
CREATEWIDGETV(inventoryWindow, InventoryWindow,
PlayerInfo::getInventory());
#ifdef EATHENA_SUPPORT
- if (serverFeatures->haveCart())
+ if (serverFeatures && serverFeatures->haveCart())
{
CREATEWIDGETV(cartWindow, InventoryWindow,
PlayerInfo::getCartInventory());
@@ -285,7 +286,8 @@ static void createGuiWindows()
if (localPlayer)
localPlayer->updateStatus();
- generalHandler->gameStarted();
+ if (generalHandler)
+ generalHandler->gameStarted();
}
/**
@@ -293,7 +295,8 @@ static void createGuiWindows()
*/
static void destroyGuiWindows()
{
- generalHandler->gameEnded();
+ if (generalHandler)
+ generalHandler->gameEnded();
if (whoIsOnline)
whoIsOnline->setAllowUpdate(false);