From 61533a598981ab3635e9cffcbb9794d55e7a7b43 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 28 Jul 2018 11:00:32 +0300 Subject: [PATCH] Fixed a bug that allowed sending an empty string in the chat window. --- src/chatwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/chatwindow.cpp b/src/chatwindow.cpp index b9dc5ef..29857a0 100644 --- a/src/chatwindow.cpp +++ b/src/chatwindow.cpp @@ -38,6 +38,8 @@ void ChatWindow::sendMessage(QString msgText) void ChatWindow::sendMsgButtonClicked() { QString msg = ui->msgEdit->text(); + if(msg == "") + return; sendMessage(msg); ui->msgEdit->setText(""); }