From 7bc1fc3d0df46da6c944d1fdedc3e45a433efbb2 Mon Sep 17 00:00:00 2001 From: WarmUpTill Date: Sun, 15 Oct 2023 21:01:14 +0200 Subject: [PATCH] Fix crash if previous condition / action was invalid --- src/macro-external/twitch/macro-action-twitch.cpp | 1 + src/macro-external/twitch/macro-condition-twitch.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/macro-external/twitch/macro-action-twitch.cpp b/src/macro-external/twitch/macro-action-twitch.cpp index d40dfaf8..4c66f179 100644 --- a/src/macro-external/twitch/macro-action-twitch.cpp +++ b/src/macro-external/twitch/macro-action-twitch.cpp @@ -610,6 +610,7 @@ void MacroActionTwitchEdit::ActionChanged(int idx) } if (idx == -1) { // Reset to previous selection + const QSignalBlocker b(_actions); _actions->setCurrentIndex(_actions->findData( static_cast(_entryData->_action))); return; diff --git a/src/macro-external/twitch/macro-condition-twitch.cpp b/src/macro-external/twitch/macro-condition-twitch.cpp index 1323a4f9..fdb9a78f 100644 --- a/src/macro-external/twitch/macro-condition-twitch.cpp +++ b/src/macro-external/twitch/macro-condition-twitch.cpp @@ -773,6 +773,7 @@ void MacroConditionTwitchEdit::ConditionChanged(int idx) } if (idx == -1) { // Reset to previous selection + const QSignalBlocker b(_conditions); _conditions->setCurrentIndex(_conditions->findData( static_cast(_entryData->GetCondition()))); return;