diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-07-11 00:12:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-07-11 00:12:43 +0300 |
commit | 368afa4bc05e5b66e521b6c881cd8e8f260cf5df (patch) | |
tree | ec9bd6a3c992c46550ad9aa396f10862257db68d /src/net | |
parent | ee75580d40c5c444d184a6ecbeb99493ba42085a (diff) | |
download | plus-368afa4bc05e5b66e521b6c881cd8e8f260cf5df.tar.gz plus-368afa4bc05e5b66e521b6c881cd8e8f260cf5df.tar.bz2 plus-368afa4bc05e5b66e521b6c881cd8e8f260cf5df.tar.xz plus-368afa4bc05e5b66e521b6c881cd8e8f260cf5df.zip |
Add missing checks into other files.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/ea/playerhandler.cpp | 5 | ||||
-rw-r--r-- | src/net/eathena/pethandler.cpp | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index 177b3a023..ead22a984 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -100,6 +100,11 @@ void PlayerHandler::processPlayerWarp(Net::MessageIn &msg) localPlayer->stopAttack(); Game *const game = Game::instance(); + if (!game) + { + BLOCK_END("PlayerHandler::processPlayerWarp") + return; + } const std::string ¤tMapName = game->getCurrentMapName(); const bool sameMap = (currentMapName == mapPath); diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp index d813b6551..8b0103bab 100644 --- a/src/net/eathena/pethandler.cpp +++ b/src/net/eathena/pethandler.cpp @@ -202,6 +202,8 @@ void PetHandler::processEggsList(Net::MessageIn &msg) { const int count = (msg.readInt16("len") - 4) / 2; Inventory *const inv = PlayerInfo::getInventory(); + if (!inv) + return; menu = MenuType::Eggs; if (count == 1) |