From fb21201678ad8944dfbdd30b5ae312ba7fb401a0 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 20 Feb 2004 05:11:12 +0000 Subject: [PATCH] tolerate corrupt images --- stepmania/src/RageBitmapTexture.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/stepmania/src/RageBitmapTexture.cpp b/stepmania/src/RageBitmapTexture.cpp index 0c6e9e4c6d..587e1a3db5 100644 --- a/stepmania/src/RageBitmapTexture.cpp +++ b/stepmania/src/RageBitmapTexture.cpp @@ -84,10 +84,13 @@ void RageBitmapTexture::Create() ResolvePath( actualID.filename ); SDL_Surface *img = SDL_LoadImage( actualID.filename ); - /* XXX: Wait, we don't want to throw for all images; in particular, we - * want to tolerate corrupt/unknown background images. */ - if(img == NULL) - RageException::Throw( "RageBitmapTexture: Couldn't load %s: %s", actualID.filename.c_str(), SDL_GetError() ); + /* Tolerate corrupt/unknown images. */ + if( img == NULL ) + { + LOG->Warn( "RageBitmapTexture: Couldn't load %s: %s", actualID.filename.c_str(), SDL_GetError() ); + img = mySDL_MakeDummySurface( 64, 64 ); + ASSERT( img != NULL ); + } if(actualID.bHotPinkColorKey) {