diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-09-04 23:00:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-09-05 00:05:00 +0300 |
commit | c80c18c42249407a386fd6b484597e03acc32437 (patch) | |
tree | 55e47bd5d6930427cb1c47c9a1e23fdff5df1fd8 | |
parent | 7549b7c7286197be5f29ab5f2f919e0404e58e97 (diff) | |
download | manaverse-c80c18c42249407a386fd6b484597e03acc32437.tar.gz manaverse-c80c18c42249407a386fd6b484597e03acc32437.tar.bz2 manaverse-c80c18c42249407a386fd6b484597e03acc32437.tar.xz manaverse-c80c18c42249407a386fd6b484597e03acc32437.zip |
Fix crash if enter simple text into chat window before connecting to server.
-rw-r--r-- | src/gui/widgets/tabs/chat/chattab.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/widgets/tabs/chat/chattab.cpp b/src/gui/widgets/tabs/chat/chattab.cpp index 358fd8c44..ae75f9981 100644 --- a/src/gui/widgets/tabs/chat/chattab.cpp +++ b/src/gui/widgets/tabs/chat/chattab.cpp @@ -429,8 +429,11 @@ void ChatTab::clearText() void ChatTab::handleInput(const std::string &msg) { - chatHandler->talk(ChatWindow::doReplace(msg), - mChannelName); + if (chatHandler) + { + chatHandler->talk(ChatWindow::doReplace(msg), + mChannelName); + } } void ChatTab::handleCommandStr(const std::string &msg) |