api: fix crash on passing on no subsystem

This commit is contained in:
Adam Sutton 2014-05-27 10:06:39 +01:00
parent c8a392e1fa
commit 2b54989e6f

View file

@ -68,7 +68,7 @@ api_exec ( const char *subsystem, htsmsg_t *args, htsmsg_t **resp )
const char *op;
/* Args and response must be set */
if (!args || !resp)
if (!args || !resp || !subsystem)
return EINVAL;
// Note: there is no locking while checking the hook tree, its assumed