From 830befab32430cc1220dc2583b58d4c1bef5bfdd Mon Sep 17 00:00:00 2001 From: Maschell Date: Sun, 12 Jan 2025 20:09:09 +0100 Subject: [PATCH] Check if callback for button combo is not null --- source/ButtonComboManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/ButtonComboManager.cpp b/source/ButtonComboManager.cpp index 5ede433..ff62298 100644 --- a/source/ButtonComboManager.cpp +++ b/source/ButtonComboManager.cpp @@ -293,6 +293,10 @@ std::optional> ButtonComboManager::CreateComb err = BUTTON_COMBO_MODULE_ERROR_INVALID_COMBO; return std::nullopt; } + if (options.callbackOptions.callback == nullptr) { + err = BUTTON_COMBO_MODULE_ERROR_INVALID_ARGUMENT; + return std::nullopt; + } bool observer = false; switch (options.buttonComboOptions.type) {