Make helper call a little safer (suggested by Russell on IRC)
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 17 Oct 2008 17:09:03 +0000 (17:09 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 17 Oct 2008 17:09:03 +0000 (17:09 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@150635 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index a477c97..8ad6b5d 100644 (file)
@@ -2312,8 +2312,9 @@ static void iax2_destroy(int callno)
        struct ast_channel *owner = NULL;
 
 retry:
-       pvt = iaxs[callno];
-       iax2_destroy_helper(pvt);
+       if ((pvt = iaxs[callno])) {
+               iax2_destroy_helper(pvt);
+       }
 
        lastused[callno] = ast_tvnow();