Channel should never be a nullptr, set it to the "empty channel"
This commit is contained in:
@@ -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)));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user