From cb681643c8d350bdc134c01d90a3b6d0355208b3 Mon Sep 17 00:00:00 2001 From: WarmUpTill Date: Mon, 31 Jan 2022 22:21:36 +0100 Subject: [PATCH] Fix scene switch action blocking unexpectedly If "wait for transition" was checked and no valid scene was selected the waitForTransitionChange() function will wait for its maximum allowed duration as switcher->currentScene will never be null. --- src/macro-action-scene-switch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/macro-action-scene-switch.cpp b/src/macro-action-scene-switch.cpp index 1db50d74..69afaa85 100644 --- a/src/macro-action-scene-switch.cpp +++ b/src/macro-action-scene-switch.cpp @@ -40,7 +40,7 @@ bool MacroActionSwitchScene::PerformAction() auto scene = _scene.GetScene(); switchScene({scene, _transition.GetTransition(), (int)(_duration.seconds * 1000)}); - if (_blockUntilTransitionDone) { + if (_blockUntilTransitionDone && scene) { waitForTransitionChange(scene); return !switcher->abortMacroWait; }