We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70a0eb0 commit bba5ff7Copy full SHA for bba5ff7
src/Player.cpp
@@ -1632,7 +1632,11 @@ void Player::introducePlayer(Player *player) {
1632
void Player::namePlayer(TYPE_OF_CHARACTER_ID playerId, const std::string &name) {
1633
const Character *character = World::get()->findCharacter(playerId);
1634
1635
- if (character->getType() == player && this->getId() != playerId) {
+ if (character != nullptr) {
1636
+
1637
+ Logger::error(LogFacility::Player) << to_string() << " tried to name another player that already logged off." << Log::end;
1638
1639
+ } else if (character->getType() == player && this->getId() != playerId) {
1640
if (name.length() > 0) {
1641
namedPlayers[playerId] = name;
1642
} else {
0 commit comments