diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-16 14:31:06 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-16 14:31:06 +0300 |
commit | 44ca1b1c650e08e45de738b19513136e71e40349 (patch) | |
tree | 70cbb7727880f18850d09584789493408cda91e3 /src/gui | |
parent | 040bb0a010786125d4964a9051d4c7b56dd9861b (diff) | |
download | manaplus-44ca1b1c650e08e45de738b19513136e71e40349.tar.gz manaplus-44ca1b1c650e08e45de738b19513136e71e40349.tar.bz2 manaplus-44ca1b1c650e08e45de738b19513136e71e40349.tar.xz manaplus-44ca1b1c650e08e45de738b19513136e71e40349.zip |
add missing checks.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/socialwindow.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp index 34973f347..08e4b6f44 100644 --- a/src/gui/socialwindow.cpp +++ b/src/gui/socialwindow.cpp @@ -1832,11 +1832,14 @@ void SocialWindow::updateParty() return; Party *const party = player_node->getParty(); - PartyMap::iterator it = mParties.find(party); - if (it != mParties.end()) + if (party) { - SocialTab *const tab = (*it).second; - tab->buildCounter(); + PartyMap::iterator it = mParties.find(party); + if (it != mParties.end()) + { + SocialTab *const tab = (*it).second; + tab->buildCounter(); + } } } @@ -1863,11 +1866,14 @@ void SocialWindow::updateGuildCounter(const int online, const int total) return; Guild *const guild = player_node->getGuild(); - GuildMap::iterator it = mGuilds.find(guild); - if (it != mGuilds.end()) + if (guild) { - SocialTab *const tab = (*it).second; - tab->buildCounter(online, total); + GuildMap::iterator it = mGuilds.find(guild); + if (it != mGuilds.end()) + { + SocialTab *const tab = (*it).second; + tab->buildCounter(online, total); + } } } |