From c80c18c42249407a386fd6b484597e03acc32437 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 4 Sep 2017 23:00:34 +0300 Subject: Fix crash if enter simple text into chat window before connecting to server. --- src/gui/widgets/tabs/chat/chattab.cpp | 7 +++++-- 1 file 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) -- cgit v1.2.3-70-g09d2