summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/chatwindow.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index eb14628ea..87e6c5b3c 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -572,16 +572,18 @@ void ChatWindow::ignoreAllWhispers()
iter != mWhispers.end();
++ iter)
{
- const WhisperTab *const tab = dynamic_cast<const WhisperTab* const>(
+ WhisperTab *const tab = dynamic_cast<WhisperTab* const>(
iter->second);
- if (tab && player_relations.getRelation(tab->getNick())
- != PlayerRelation::IGNORED)
+ if (tab)
{
- player_relations.setRelation(tab->getNick(),
- PlayerRelation::IGNORED);
+ if (player_relations.getRelation(tab->getNick())
+ != PlayerRelation::IGNORED)
+ {
+ player_relations.setRelation(tab->getNick(),
+ PlayerRelation::IGNORED);
+ }
+ tab->handleCommand("close", "");
}
-
- delete2(iter->second)
}
}