From f664dcdffee192d0e61f0e9e990fbd4fcb168ca0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 4 Jun 2013 21:58:18 +0300 Subject: Fix crash in closing chat tabs by mod key + right click. --- src/gui/widgets/whispertab.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/gui/widgets') diff --git a/src/gui/widgets/whispertab.cpp b/src/gui/widgets/whispertab.cpp index 45e1b12c4..dbca226a8 100644 --- a/src/gui/widgets/whispertab.cpp +++ b/src/gui/widgets/whispertab.cpp @@ -29,6 +29,8 @@ #include "net/chathandler.h" #include "net/net.h" +#include "gui/widgets/windowcontainer.h" + #include "utils/gettext.h" #include "debug.h" @@ -137,7 +139,10 @@ bool WhisperTab::handleCommand(const std::string &type, } else if (type == "close") { - delete this; + if (windowContainer) + windowContainer->scheduleDelete(this); + else + delete this; if (chatWindow) chatWindow->defaultTab(); } -- cgit v1.2.3-70-g09d2