diff --git a/apps/app_senddtmf.c b/apps/app_senddtmf.c
index 66e31c850079f5f575ac3014046570b65b0a004b..81651ec6b05d5bb0164e369c8ffcbc4c34c9d760 100644
--- a/apps/app_senddtmf.c
+++ b/apps/app_senddtmf.c
@@ -66,7 +66,7 @@ static int senddtmf_exec(struct ast_channel *chan, void *vdata)
 		AST_APP_ARG(timeout);
 	);
 
-	if (ast_strlen_zero(data)) {
+	if (ast_strlen_zero(vdata)) {
 		ast_log(LOG_WARNING, "SendDTMF requires an argument (digits or *#aAbBcCdD)\n");
 		return 0;
 	}