changeset 12534:b6ccdba8bc2d

Segfault fix for some h264 in avi files Patch by adland
author rtognimp
date Sun, 06 Jun 2004 13:48:30 +0000
parents 44c00d92f718
children 48ae29c2298c
files libmpcodecs/vd_ffmpeg.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c	Sun Jun 06 13:44:23 2004 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Sun Jun 06 13:48:30 2004 +0000
@@ -644,7 +644,7 @@
   }
 
 	// Palette support: free palette buffer allocated in get_buffer
-	if ((mpi->bpp == 8) && (mpi->planes[1] != NULL))
+	if ( mpi && (mpi->bpp == 8) && (mpi->planes[1] != NULL))
 		free(mpi->planes[1]);
 
 #if LIBAVCODEC_BUILD >= 4644