From 3caeb00e32368497418444d92f3748073fa69a08 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Tue, 20 Nov 2001 03:43:18 +0000 Subject: avoid segfault if rle is null CVS patchset: 1085 CVS date: 2001/11/20 03:43:18 --- src/libspudec/spu.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libspudec/spu.c b/src/libspudec/spu.c index dcee56c55..62e89ef90 100644 --- a/src/libspudec/spu.c +++ b/src/libspudec/spu.c @@ -35,7 +35,7 @@ * along with this program; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: spu.c,v 1.23 2001/11/18 03:53:24 guenter Exp $ + * $Id: spu.c,v 1.24 2001/11/20 03:43:18 miguelfreitas Exp $ * */ @@ -452,6 +452,11 @@ void spu_discover_clut(spu_state_t *state, vo_overlay_t *ovl) memset(found,0,sizeof(found)); rle = ovl->rle; + /* this seems to be a problem somewhere else, + why rle is null? */ + if( !rle ) + return; + /* suppose the first and last pixels are bg */ if( rle[0].color != rle[ovl->num_rle-1].color ) return; -- cgit v1.2.3