diff --git a/src/switch_loadable_module.c b/src/switch_loadable_module.c index 1c64030933..d592a35da6 100644 --- a/src/switch_loadable_module.c +++ b/src/switch_loadable_module.c @@ -1349,7 +1349,7 @@ SWITCH_DECLARE(switch_status_t) switch_api_execute(const char *cmd, const char * } } - if ((api = switch_loadable_module_get_api_interface(cmd)) != 0) { + if (cmd && (api = switch_loadable_module_get_api_interface(cmd)) != 0) { status = api->function(arg, session, stream); } else { status = SWITCH_STATUS_FALSE;