Fix crash when closing and quickly opening a split, then running /clearmessages (#3852)
This commit is contained in:
@@ -932,7 +932,11 @@ void CommandController::initialize(Settings &, Paths &paths)
|
||||
auto *currentPage = dynamic_cast<SplitContainer *>(
|
||||
getApp()->windows->getMainWindow().getNotebook().getSelectedPage());
|
||||
|
||||
currentPage->getSelectedSplit()->getChannelView().clearMessages();
|
||||
if (auto split = currentPage->getSelectedSplit())
|
||||
{
|
||||
split->getChannelView().clearMessages();
|
||||
}
|
||||
|
||||
return "";
|
||||
});
|
||||
|
||||
|
||||
@@ -408,12 +408,13 @@ void Window::addShortcuts()
|
||||
{
|
||||
splitContainer = this->notebook_->getOrAddSelectedPage();
|
||||
}
|
||||
this->notebook_->select(splitContainer);
|
||||
Split *split = new Split(splitContainer);
|
||||
split->setChannel(
|
||||
getApp()->twitch->getOrAddChannel(si.channelName));
|
||||
split->setFilters(si.filters);
|
||||
splitContainer->appendSplit(split);
|
||||
splitContainer->setSelected(split);
|
||||
this->notebook_->select(splitContainer);
|
||||
return "";
|
||||
}},
|
||||
{"toggleLocalR9K",
|
||||
|
||||
Reference in New Issue
Block a user