From ae95528236830b544cd015f2aefb8092d1202d16 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Mon, 10 Jul 2017 08:32:33 +0200 Subject: [PATCH] Channel should never be a nullptr, set it to the "empty channel" --- src/widgets/chatwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/chatwidget.cpp b/src/widgets/chatwidget.cpp index 459e37c3..73c06178 100644 --- a/src/widgets/chatwidget.cpp +++ b/src/widgets/chatwidget.cpp @@ -139,7 +139,7 @@ void ChatWidget::channelNameUpdated(const std::string &newChannelName) this->messages.clear(); if (newChannelName.empty()) { - this->channel = nullptr; + this->channel = this->channelManager.getEmpty(); } else { this->setChannel(this->channelManager.addChannel(QString::fromStdString(newChannelName))); }