summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/widgets/channeltab.cpp3
-rw-r--r--src/gui/widgets/chattab.cpp4
2 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/widgets/channeltab.cpp b/src/gui/widgets/channeltab.cpp
index 32d6041f..a7370a4c 100644
--- a/src/gui/widgets/channeltab.cpp
+++ b/src/gui/widgets/channeltab.cpp
@@ -37,9 +37,6 @@ ChannelTab::ChannelTab(Channel *channel) :
ChannelTab::~ChannelTab()
{
- // Clear tab so the channel won't try to delete it again (otherwise we'd
- // run into issues if the ChatWindow is deleted before the channels are)
- mChannel->setTab(0);
}
void ChannelTab::handleInput(const std::string &msg)
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;
}