diff libmpcodecs/vd_ffmpeg.c @ 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 84a3e29c9ec5
children aebedab0ecac
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