From 8641435142f4c64ddba2150509ac1c14be1322ee Mon Sep 17 00:00:00 2001 From: pajlada Date: Sat, 17 Apr 2021 11:55:44 +0200 Subject: [PATCH] Fix crash that could occur when the user changed the "Custom stream player URI Scheme" setting if the user had closed down and splits in the application runtime (#2592) --- CHANGELOG.md | 2 ++ src/widgets/splits/SplitHeader.cpp | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b83693b1f..77c262a46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unversioned +- Bugfix: Fix crash that could occur when the user changed the "Custom stream player URI Scheme" setting if the user had closed down and splits in the application runtime. (#2592) + ## 2.3.0 - Major: Added clip creation support. You can create clips with `/clip` command, `Alt+X` keybind or `Create a clip` option in split header's context menu. This requires a new authentication scope so re-authentication will be required to use it. (#2271, #2377, #2528) diff --git a/src/widgets/splits/SplitHeader.cpp b/src/widgets/splits/SplitHeader.cpp index 869184a24..c39d9f72c 100644 --- a/src/widgets/splits/SplitHeader.cpp +++ b/src/widgets/splits/SplitHeader.cpp @@ -314,12 +314,14 @@ void SplitHeader::initializeLayout() } }); - getSettings()->customURIScheme.connect([this] { - if (const auto drop = this->dropdownButton_) - { - drop->setMenu(this->createMainMenu()); - } - }); + getSettings()->customURIScheme.connect( + [this] { + if (const auto drop = this->dropdownButton_) + { + drop->setMenu(this->createMainMenu()); + } + }, + this->managedConnections_); layout->setMargin(0); layout->setSpacing(0);