From 0812be2332c94b740a70de4a71cbf656cf41f4ef Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 21 Nov 2002 00:54:28 +0000 Subject: [PATCH] for now, throw on failed image load --- stepmania/src/RageBitmapTexture.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stepmania/src/RageBitmapTexture.cpp b/stepmania/src/RageBitmapTexture.cpp index 199058f274..aa6be72ab6 100644 --- a/stepmania/src/RageBitmapTexture.cpp +++ b/stepmania/src/RageBitmapTexture.cpp @@ -137,6 +137,10 @@ void RageBitmapTexture::Create() /* Load the image into an SDL surface. */ SDL_Surface *img = IMG_Load(m_sFilePath); + /* XXX: Wait, we don't want to throw for all images; in particular, we + * want to tolerate corrupt/unknown background images. */ + if(img == NULL) + throw RageException( "Couldn't load %s: %s", m_sFilePath, SDL_GetError() ); /* Figure out which texture format to use. */ GLenum fmtTexture;