diff --git a/source/plugin/ButtonComboManager.cpp b/source/plugin/ButtonComboManager.cpp index 3d1c64c..7385b7c 100644 --- a/source/plugin/ButtonComboManager.cpp +++ b/source/plugin/ButtonComboManager.cpp @@ -340,6 +340,11 @@ namespace { class ButtonComboWrapper { public: static std::optional Create(const WUPSButtonCombo_ComboOptions &otherOptions, WUPSButtonCombo_ComboStatus &outStatus, WUPSButtonCombo_Error &outError) { + if (otherOptions.callbackOptions.callback == nullptr) { + outStatus = WUPS_BUTTON_COMBO_COMBO_STATUS_INVALID_STATUS; + outError = WUPS_BUTTON_COMBO_ERROR_INVALID_ARGS; + return {}; + } ButtonComboModule_ComboStatus status = BUTTON_COMBO_MODULE_COMBO_STATUS_INVALID_STATUS; auto contextData = std::make_unique(otherOptions.callbackOptions.callback, otherOptions.callbackOptions.context); ButtonComboModule_ComboOptions convertedOptions;