Fix potential transfer seg
authorMark Spencer <markster@digium.com>
Mon, 26 Jul 2004 13:16:57 +0000 (13:16 +0000)
committerMark Spencer <markster@digium.com>
Mon, 26 Jul 2004 13:16:57 +0000 (13:16 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3513 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index 2510763..1bdc078 100755 (executable)
@@ -3210,7 +3210,8 @@ static struct ast_frame *zt_handle_event(struct ast_channel *ast)
                                                                        p->subs[SUB_THREEWAY].owner->_softhangup |= AST_SOFTHANGUP_DEV;
                                                                else if (res) {
                                                                        /* Don't actually hang up at this point */
-                                                                       ast_mutex_unlock(&p->subs[SUB_THREEWAY].owner->lock);
+                                                                       if (p->subs[SUB_THREEWAY].owner)
+                                                                               ast_mutex_unlock(&p->subs[SUB_THREEWAY].owner->lock);
                                                                        break;
                                                                }
                                                        } else