summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-04 23:00:34 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-05 00:05:00 +0300
commitc80c18c42249407a386fd6b484597e03acc32437 (patch)
tree55e47bd5d6930427cb1c47c9a1e23fdff5df1fd8 /src/gui/widgets
parent7549b7c7286197be5f29ab5f2f919e0404e58e97 (diff)
downloadmanaverse-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.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/tabs/chat/chattab.cpp7
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)