mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-10 02:26:02 -05:00
Fix crash due to "keep source active" setting
This commit is contained in:
@@ -172,11 +172,12 @@ void SourceActiveKeeper::SetActive(bool active)
|
||||
if (_active == active) {
|
||||
return;
|
||||
}
|
||||
_active = active;
|
||||
if (_active) {
|
||||
if (active) {
|
||||
_active = true;
|
||||
AcquireRef();
|
||||
} else {
|
||||
ReleaseRef();
|
||||
_active = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -124,6 +124,10 @@ void MacroConditionVideo::UpdateActiveKeeper()
|
||||
if (_video.type == VideoInput::Type::OBS_MAIN_OUTPUT) {
|
||||
return;
|
||||
}
|
||||
if (!_keepActive) {
|
||||
_lastActiveKeeperSource = nullptr;
|
||||
return;
|
||||
}
|
||||
auto videoSource = _video.GetVideo();
|
||||
if (videoSource == _lastActiveKeeperSource) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user