Commited in SoC by Vitor Sessak on 2007-10-29 16:00:27 Originally committed as revision 12024 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -363,7 +363,12 @@ static const char *filter_name(void *p) · 362 unmodified lines | ||
| 363 | 363 | |
| 364 | 364 | AVFilterContext *avfilter_open(AVFilter *filter, char *inst_name) |
| 365 | 365 | { |
| 366 | − AVFilterContext *ret = av_malloc(sizeof(AVFilterContext)); | |
| 366 | + AVFilterContext *ret; | |
| 367 | + | |
| 368 | + if (!filter) | |
| 369 | + return 0; | |
| 370 | + | |
| 371 | + ret = av_malloc(sizeof(AVFilterContext)); | |
| 367 | 372 | |
| 368 | 373 | ret->av_class = av_mallocz(sizeof(AVClass)); |
| 369 | 374 | ret->av_class->item_name = filter_name; |