for now, throw on failed image load

This commit is contained in:
Glenn Maynard
2002-11-21 00:54:28 +00:00
parent 48eee90ab2
commit 0812be2332
+4
View File
@@ -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;