diff --git a/src/chat.cpp b/src/chat.cpp index aac9cfee78..76e6bbb6d5 100644 --- a/src/chat.cpp +++ b/src/chat.cpp @@ -476,7 +476,7 @@ bool Chat::talkToChannel(const Player& player, SpeakClasses type, const std::str } if (channelId == CHANNEL_GUILD) { - const auto rank = player.getGuildRank(); + const auto& rank = player.getGuildRank(); if (rank && rank->level > 1) { type = TALKTYPE_CHANNEL_O; } else if (type != TALKTYPE_CHANNEL_Y) {