Skip to content

Commit b167bb5

Browse files
committed
Check if callback for button combo is not null
1 parent a5ece20 commit b167bb5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

source/ButtonComboManager.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,10 @@ std::optional<std::shared_ptr<ButtonComboInfoIF>> ButtonComboManager::CreateComb
293293
err = BUTTON_COMBO_MODULE_ERROR_INVALID_COMBO;
294294
return std::nullopt;
295295
}
296+
if (options.callbackOptions.callback == nullptr) {
297+
err = BUTTON_COMBO_MODULE_ERROR_INVALID_ARGUMENT;
298+
return std::nullopt;
299+
}
296300

297301
bool observer = false;
298302
switch (options.buttonComboOptions.type) {

0 commit comments

Comments
 (0)