diff options
Diffstat (limited to 'src/commandhandler.cpp')
-rw-r--r-- | src/commandhandler.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp index 0f1e60a25..4022d8d58 100644 --- a/src/commandhandler.cpp +++ b/src/commandhandler.cpp @@ -54,6 +54,7 @@ #include "net/guildhandler.h" #include "net/net.h" #include "net/partyhandler.h" +#include "net/playerhandler.h" #include "net/tradehandler.h" #ifdef DEBUG_DUMP_LEAKS @@ -664,6 +665,9 @@ void CommandHandler::handleNavigate(const std::string &args, bool CommandHandler::parse2Int(const std::string &args, int *x, int *y) { + if (!x || !y) + return false; + bool isValid = false; const std::string::size_type pos = args.find(" "); if (pos != std::string::npos) @@ -748,7 +752,10 @@ void CommandHandler::handlePseudoAway(const std::string &args, ChatTab *tab A_UNUSED) { if (player_node) + { player_node->setPseudoAway(args); + player_node->updateStatus(); + } } void CommandHandler::handleFollow(const std::string &args, ChatTab *tab) @@ -1185,6 +1192,9 @@ void showRes(std::string str, ResourceManager::Resources *res); void showRes(std::string str, ResourceManager::Resources *res) { + if (!res) + return; + if (debugChatTab) debugChatTab->chatLog(str + toString(res->size())); logger->log(str + toString(res->size())); |