]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
api: fix crash on passing on no subsystem
authorAdam Sutton <dev@adamsutton.me.uk>
Tue, 27 May 2014 09:06:39 +0000 (10:06 +0100)
committerAdam Sutton <dev@adamsutton.me.uk>
Tue, 27 May 2014 09:06:39 +0000 (10:06 +0100)
src/api.c

index f88c20957f618d28411b9199a6b009e7c394f147..7af71828dca83f45b1eed2b148d70decee176473 100644 (file)
--- a/src/api.c
+++ b/src/api.c
@@ -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