Avoid a null pointer dereference on oom in the aac encoder.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Sun, 30 Jun 2013 21:25:18 +0000 (23:25 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Sun, 30 Jun 2013 21:25:18 +0000 (23:25 +0200)
Fixes ticket #2732.

libavcodec/psymodel.c

index ea11636..bfc85b3 100644 (file)
@@ -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);