Channel should never be a nullptr, set it to the "empty channel"

This commit is contained in:
Rasmus Karlsson
2017-07-10 08:32:33 +02:00
parent 5aa892e834
commit ae95528236
+1 -1
View File
@@ -139,7 +139,7 @@ void ChatWidget::channelNameUpdated(const std::string &newChannelName)
this->messages.clear(); this->messages.clear();
if (newChannelName.empty()) { if (newChannelName.empty()) {
this->channel = nullptr; this->channel = this->channelManager.getEmpty();
} else { } else {
this->setChannel(this->channelManager.addChannel(QString::fromStdString(newChannelName))); this->setChannel(this->channelManager.addChannel(QString::fromStdString(newChannelName)));
} }