summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/avatarlistbox.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index 748e038e2..5ac6721a5 100644
--- a/src/gui/widgets/avatarlistbox.cpp
+++ b/src/gui/widgets/avatarlistbox.cpp
@@ -366,8 +366,10 @@ void AvatarListBox::mousePressed(gcn::MouseEvent &event)
{
if (ava->getType() == AVATAR_PLAYER && chatWindow)
{
- chatWindow->addWhisperTab(model->getAvatarAt(selected)
- ->getName(), true);
+ ChatTab *tab = chatWindow->addWhisperTab(
+ model->getAvatarAt(selected)->getName(), true);
+ if (chatWindow && tab)
+ chatWindow->saveState();
}
}
}