From c9dbf0842f3d06e262befb2be2d15ad24b95de85 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Mon, 22 Feb 2010 21:19:28 +0100 Subject: Fixed crash on exit when you're part of a guild When the ChannelTab gets deleted by the Channel, the ChatWindow may have already been removed. So before telling it that the tab got deleted, check whether it's still there. Reviewed-by: Jared Adams --- src/gui/widgets/chattab.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gui/widgets/chattab.cpp') diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp index 4b1772d8..d2221255 100644 --- a/src/gui/widgets/chattab.cpp +++ b/src/gui/widgets/chattab.cpp @@ -64,7 +64,9 @@ ChatTab::ChatTab(const std::string &name) : Tab() ChatTab::~ChatTab() { - chatWindow->removeTab(this); + if (chatWindow) + chatWindow->removeTab(this); + delete mTextOutput; delete mScrollArea; } -- cgit v1.2.3-60-g2f50