From 5952117559fdb6fb22c9415ba9c1a75e1d9e205b Mon Sep 17 00:00:00 2001 From: Damien Wedhorn Date: Thu, 8 Dec 2011 06:59:01 +0000 Subject: [PATCH] Fix segfault on answer. Fix a segfault if an attempt to answer a call is made between when the inbound call gives up (and the channel is removed) and when the device is notified and removes the call from the device. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347490 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_skinny.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index 3799747..f65d377 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -5935,7 +5935,9 @@ static int handle_offhook_message(struct skinny_req *req, struct skinnysession * if (reference) { sub = find_subchannel_by_instance_reference(d, instance, reference); - l = sub->line; + if (sub) { + l = sub->line; + } } if (!sub) { if (instance) { -- 1.7.9.5