summaryrefslogtreecommitdiff
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
parent040bb0a010786125d4964a9051d4c7b56dd9861b (diff)
downloadplus-44ca1b1c650e08e45de738b19513136e71e40349.tar.gz
plus-44ca1b1c650e08e45de738b19513136e71e40349.tar.bz2
plus-44ca1b1c650e08e45de738b19513136e71e40349.tar.xz
plus-44ca1b1c650e08e45de738b19513136e71e40349.zip
add missing checks.
-rw-r--r--src/gui/socialwindow.cpp22
-rw-r--r--src/net/ea/partyhandler.cpp3
2 files changed, 16 insertions, 9 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);
+ }
}
}
diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp
index 819b2f133..7eee0d4e7 100644
--- a/src/net/ea/partyhandler.cpp
+++ b/src/net/ea/partyhandler.cpp
@@ -142,7 +142,8 @@ void PartyHandler::processPartyInfo(Net::MessageIn &msg) const
{
player_node->setParty(Ea::taParty);
player_node->setPartyName(Ea::taParty->getName());
- socialWindow->updateParty();
+ if (socialWindow)
+ socialWindow->updateParty();
}
}