diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-24 14:55:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-25 20:06:07 +0300 |
commit | 9d521a19be347703bfdbb7802d0397a59c3edd7a (patch) | |
tree | 9a4e56edc84d5cfd8ebaea17fa19296c51e1e661 /src/gui/windows/whoisonline.cpp | |
parent | 841fe55e67ea467a8e2192dee5c169d282a35148 (diff) | |
download | mv-9d521a19be347703bfdbb7802d0397a59c3edd7a.tar.gz mv-9d521a19be347703bfdbb7802d0397a59c3edd7a.tar.bz2 mv-9d521a19be347703bfdbb7802d0397a59c3edd7a.tar.xz mv-9d521a19be347703bfdbb7802d0397a59c3edd7a.zip |
Add missing checks in windows.
Diffstat (limited to 'src/gui/windows/whoisonline.cpp')
-rw-r--r-- | src/gui/windows/whoisonline.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp index 9ff00cd34..65096f3e0 100644 --- a/src/gui/windows/whoisonline.cpp +++ b/src/gui/windows/whoisonline.cpp @@ -278,6 +278,8 @@ void WhoIsOnline::updateWindow(size_t numOnline) void WhoIsOnline::handlerPlayerRelation(const std::string &nick, OnlinePlayer *const player) { + if (!player) + return; switch (player_relations.getRelation(nick)) { case Relation::NEUTRAL: @@ -509,6 +511,8 @@ int WhoIsOnline::downloadThread(void *ptr) { int attempts = 0; WhoIsOnline *const wio = reinterpret_cast<WhoIsOnline *>(ptr); + if (!wio) + return 0; CURLcode res; const std::string url(settings.onlineListUrl + "/online.txt"); |