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
This commit is contained in:
Damien Wedhorn
2011-12-08 06:59:01 +00:00
parent 395814c33e
commit 5952117559

View File

@@ -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) {