diff --git a/apps/app_queue.c b/apps/app_queue.c
index 3fd69c775b39575fad10181ac0b4efe4c1baf83b..07d54cfc82f9dbc386fd08229973a300accf4d42 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -4393,7 +4393,7 @@ static int queue_exec(struct ast_channel *chan, void *data)
 	qe.start = time(NULL);
 
 	/* set the expire time based on the supplied timeout; */
-	if (args.queuetimeoutstr)
+	if (!ast_strlen_zero(args.queuetimeoutstr))
 		qe.expire = qe.start + atoi(args.queuetimeoutstr);
 	else
 		qe.expire = 0;