Make helper call a little safer (suggested by Russell on IRC)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@150635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2008-10-17 17:09:03 +00:00
parent b3bb9564d3
commit 6450b7c4da

View 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();