summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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();
}
}