From 476774ff63837f4cd73762286dab28282f0f78d1 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 18 May 2004 18:59:33 +0000 Subject: [PATCH] fix crash on failed BMP load --- stepmania/src/RageSurface_Load.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stepmania/src/RageSurface_Load.cpp b/stepmania/src/RageSurface_Load.cpp index e433427d51..9645612675 100644 --- a/stepmania/src/RageSurface_Load.cpp +++ b/stepmania/src/RageSurface_Load.cpp @@ -31,7 +31,8 @@ SDL_Surface *RageSurface::LoadFile( const CString &sPath ) SDL_RWclose( rw ); SDL_FreeRW( rw ); - mySDL_FixupPalettedAlpha( ret ); + if( ret ) + mySDL_FixupPalettedAlpha( ret ); } else {