From 3b4cb6934df094a413244d474379882fe50acfce Mon Sep 17 00:00:00 2001 From: WarmUpTill Date: Tue, 3 Oct 2023 13:56:11 +0200 Subject: [PATCH] Prevent crashes when downgrading to older version of Twitch action --- src/macro-external/twitch/macro-action-twitch.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/macro-external/twitch/macro-action-twitch.cpp b/src/macro-external/twitch/macro-action-twitch.cpp index 96addb5b..8fbeb2b4 100644 --- a/src/macro-external/twitch/macro-action-twitch.cpp +++ b/src/macro-external/twitch/macro-action-twitch.cpp @@ -330,6 +330,9 @@ bool MacroActionTwitch::ActionIsSupportedByToken() } auto option = requiredOption.find(_action); assert(option != requiredOption.end()); + if (option == requiredOption.end()) { + return false; + } return token->OptionIsEnabled(option->second); }