diff --git a/funcs/func_vmcount.c b/funcs/func_vmcount.c
index 0e6cfef1eac367e512de796530e0c3026896f207..cde16653f65cccc40c170094e1b836b826c98fda 100644
--- a/funcs/func_vmcount.c
+++ b/funcs/func_vmcount.c
@@ -55,6 +55,9 @@ static int acf_vmcount_exec(struct ast_channel *chan, const char *cmd, char *arg
 
 	buf[0] = '\0';
 
+	if (ast_strlen_zero(argsstr))
+		return -1;
+
 	AST_STANDARD_APP_ARGS(args, argsstr);
 
 	if (strchr(args.vmbox, '@')) {