Skip to content

Commit

Permalink
Fix crash that can occur when changing channels (Chatterino#3799)
Browse files Browse the repository at this point in the history
The signal that handled the splitinput completer never disconnected, so
if it closed it would access bad memory
  • Loading branch information
pajlada authored Jun 14, 2022
1 parent 2874481 commit a83c139
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
- Minor: Adjust large stream thumbnail to 16:9 (#3655)
- Minor: Fixed being unable to load Twitch Usercards from the `/mentions` tab. (#3623)
- Minor: Add information about the user's operating system in the About page. (#3663)
- Bugfix: Connection to Twitch PubSub now recovers more reliably. (#3643, #3716)
- Minor: Added chatter count for each category in viewer list. (#3683, #3719)
- Minor: Sorted usernames in /vips message to be case-insensitive. (#3696)
- Minor: Added option to open a user's chat in a new tab from the usercard profile picture context menu. (#3625)
Expand All @@ -21,6 +20,8 @@
- Minor: Added ability to execute commands on chat messages using the message context menu. (#3738, #3765)
- Minor: Added `/copy` command. Usage: `/copy <text>`. Copies provided text to clipboard - can be useful with custom commands. (#3763)
- Minor: Removed total views from the usercard, as Twitch no longer updates the number. (#3792)
- Bugfix: Connection to Twitch PubSub now recovers more reliably. (#3643, #3716)
- Bugfix: Fix crash that can occur when changing channels. (#3799)
- Bugfix: Fixed viewers list search not working when used before loading finishes. (#3774)
- Bugfix: Fixed live notifications for usernames containing uppercase characters. (#3646)
- Bugfix: Fixed live notifications not getting updated for closed streams going offline. (#3678)
Expand Down
6 changes: 3 additions & 3 deletions src/widgets/splits/SplitInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ SplitInput::SplitInput(Split *_chatWidget)
new QCompleter(&this->split_->getChannel().get()->completionModel);
this->ui_.textEdit->setCompleter(completer);

this->split_->channelChanged.connect([this] {
auto completer =
new QCompleter(&this->split_->getChannel()->completionModel);
this->signalHolder_.managedConnect(this->split_->channelChanged, [this] {
auto channel = this->split_->getChannel();
auto completer = new QCompleter(&channel->completionModel);
this->ui_.textEdit->setCompleter(completer);
});

Expand Down

0 comments on commit a83c139

Please sign in to comment.