summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/partywindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/partywindow.cpp b/src/gui/partywindow.cpp
index 317811ee..3da59e9f 100644
--- a/src/gui/partywindow.cpp
+++ b/src/gui/partywindow.cpp
@@ -125,7 +125,8 @@ void PartyWindow::updateMember(int id, const std::string &memberName,
member->avatar->setName(memberName);
member->avatar->setOnline(online);
- if (Player *player = dynamic_cast<Player*>(beingManager->findBeing(id)))
+ Player *player = dynamic_cast<Player*>(beingManager->findBeing(id));
+ if (player && player->getName() == memberName)
player->setInParty(true);
}