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

View file

@ -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)));
}