diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-06-04 21:58:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-06-04 21:58:18 +0300 |
commit | f664dcdffee192d0e61f0e9e990fbd4fcb168ca0 (patch) | |
tree | 80adb115404efd4614b072d8b3343c46eb2c0e0b /src/gui/widgets/whispertab.cpp | |
parent | 41115f28f500f3acde44c9118b157f81d8ad6078 (diff) | |
download | ManaVerse-f664dcdffee192d0e61f0e9e990fbd4fcb168ca0.tar.gz ManaVerse-f664dcdffee192d0e61f0e9e990fbd4fcb168ca0.tar.bz2 ManaVerse-f664dcdffee192d0e61f0e9e990fbd4fcb168ca0.tar.xz ManaVerse-f664dcdffee192d0e61f0e9e990fbd4fcb168ca0.zip |
Fix crash in closing chat tabs by mod key + right click.
Diffstat (limited to 'src/gui/widgets/whispertab.cpp')
-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(); } |