From: Luigi Rizzo Date: Tue, 1 Jan 2008 23:54:40 +0000 (+0000) Subject: prevent a panic when destroying a channel with no incoming video. X-Git-Tag: 1.6.0-beta1~3^2~239 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afc18baa1ab38996bad8f11d42758fe0aa61790e;p=thirdparty%2Fasterisk.git prevent a panic when destroying a channel with no incoming video. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95672 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/vcodecs.c b/channels/vcodecs.c index 6eccd63f1f..ae37709200 100644 --- a/channels/vcodecs.c +++ b/channels/vcodecs.c @@ -1,7 +1,7 @@ /* * Asterisk -- An open source telephony toolkit. * - * Copyright 2007, Sergio Fadda, Luigi Rizzo + * Copyright 2007-2008, Sergio Fadda, Luigi Rizzo * * See http://www.asterisk.org for more information about * the Asterisk project. Please do not directly contact @@ -1168,6 +1168,8 @@ static struct video_dec_desc *dec_uninit(struct video_dec_desc *v) { int i; + if (v == NULL) /* not initialized yet */ + return NULL; if (v->parser) { av_parser_close(v->parser); v->parser = NULL;