diff options
Diffstat (limited to 'src/net/playerhandler.cpp')
-rw-r--r-- | src/net/playerhandler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/playerhandler.cpp b/src/net/playerhandler.cpp index e142dd91..74e959da 100644 --- a/src/net/playerhandler.cpp +++ b/src/net/playerhandler.cpp @@ -86,7 +86,7 @@ namespace { buyDialog->setVisible(false); sellDialog->setVisible(false); buySellDialog->setVisible(false); - current_npc = 0; + if (current_npc) current_npc->handleDeath(); } } deathListener; } @@ -140,7 +140,7 @@ void PlayerHandler::handleMessage(MessageIn *msg) // Switch the actual map, deleting the previous one if necessary engine->changeMap(mapPath); - current_npc = 0; + if (current_npc) current_npc->handleDeath(); float scrollOffsetX = 0.0f; float scrollOffsetY = 0.0f; |