summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-16 14:31:06 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-16 14:31:06 +0300
commit44ca1b1c650e08e45de738b19513136e71e40349 (patch)
tree70cbb7727880f18850d09584789493408cda91e3 /src/gui
parent040bb0a010786125d4964a9051d4c7b56dd9861b (diff)
downloadmv-44ca1b1c650e08e45de738b19513136e71e40349.tar.gz
mv-44ca1b1c650e08e45de738b19513136e71e40349.tar.bz2
mv-44ca1b1c650e08e45de738b19513136e71e40349.tar.xz
mv-44ca1b1c650e08e45de738b19513136e71e40349.zip
add missing checks.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/socialwindow.cpp22
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);
+ }
}
}