diff imgresample.c @ 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 bbe0bc387a19
children 6a900f539e2c
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);