changeset 4357:1654075b205c libavcodec

fix segfault with http://sam.zoy.org/zzuf/lol-ffplay.ogm and http://sam.zoy.org/zzuf/lol-ffplay.ogg
author takis
date Wed, 17 Jan 2007 10:26:13 +0000
parents c8bc01fee409
children 0924cc1db086
files imgresample.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/imgresample.c	Tue Jan 16 23:28:41 2007 +0000
+++ b/imgresample.c	Wed Jan 17 10:26:13 2007 +0000
@@ -672,6 +672,8 @@
 
 void sws_freeContext(struct SwsContext *ctx)
 {
+    if (!ctx)
+        return;
     if ((ctx->resampling_ctx->iwidth != ctx->resampling_ctx->owidth) ||
         (ctx->resampling_ctx->iheight != ctx->resampling_ctx->oheight)) {
         img_resample_close(ctx->resampling_ctx);