diff options
-rw-r--r-- | src/gui/widgets/whispertab.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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(); } |