From f4aa8085f23c3abff3114d7bf638698d42110526 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sun, 30 Jun 2013 23:25:18 +0200 Subject: [PATCH] Avoid a null pointer dereference on oom in the aac encoder. Fixes ticket #2732. --- libavcodec/psymodel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/psymodel.c b/libavcodec/psymodel.c index ea11636ce2..bfc85b3bc5 100644 --- a/libavcodec/psymodel.c +++ b/libavcodec/psymodel.c @@ -75,7 +75,7 @@ FFPsyChannelGroup *ff_psy_find_group(FFPsyContext *ctx, int channel) av_cold void ff_psy_end(FFPsyContext *ctx) { - if (ctx->model->end) + if (ctx->model && ctx->model->end) ctx->model->end(ctx); av_freep(&ctx->bands); av_freep(&ctx->num_bands);