From 9d521a19be347703bfdbb7802d0397a59c3edd7a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 24 Jun 2015 14:55:44 +0300 Subject: Add missing checks in windows. --- src/gui/windows/whoisonline.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gui/windows/whoisonline.cpp') 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(ptr); + if (!wio) + return 0; CURLcode res; const std::string url(settings.onlineListUrl + "/online.txt"); -- cgit v1.2.3-60-g2f50