From dbb47e0a47f3205898f77e5c1479f92e880574be Mon Sep 17 00:00:00 2001
From: ibercom <ibercom123@gmail.com>
Date: Mon, 18 Apr 2016 11:53:14 +0200
Subject: [PATCH] app_queue: Frequent segfaults in function can_ring_entry()

ASTERISK-25888 #close

Change-Id: I007a2f2dd99823e04fb5be3ff01f02b0a2956117
---
 apps/app_queue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apps/app_queue.c b/apps/app_queue.c
index 0123e473ab..40aed2fe54 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -4189,7 +4189,7 @@ static int can_ring_entry(struct queue_ent *qe, struct callattempt *call)
 		return 0;
 	}
 
-	if (call->member->in_call && call->lastqueue->wrapuptime) {
+	if (call->member->in_call && call->lastqueue && call->lastqueue->wrapuptime) {
 		ast_debug(1, "%s is in call, so not available (wrapuptime %d)\n",
 			call->interface, call->lastqueue->wrapuptime);
 		return 0;
-- 
GitLab