summaryrefslogtreecommitdiff
path: root/src/gui/widgets/avatarlistbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/avatarlistbox.cpp')
-rw-r--r--src/gui/widgets/avatarlistbox.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index a351c7199..53e4684d4 100644
--- a/src/gui/widgets/avatarlistbox.cpp
+++ b/src/gui/widgets/avatarlistbox.cpp
@@ -470,8 +470,9 @@ void AvatarListBox::mousePressed(MouseEvent &event)
{
if (type == MapItemType::EMPTY && chatWindow)
{
+ const std::string &name = model->getAvatarAt(selected)->getName();
const WhisperTab *const tab = chatWindow->addWhisperTab(
- model->getAvatarAt(selected)->getName(), true);
+ name, name, true);
if (tab)
chatWindow->saveState();
}