diff --git a/TODO b/TODO index 95e6806..30eaa1b 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,4 @@ -* Continue rebasing from 248c226d245db0d735653e057dd48d437d0e9eee +* Continue rebasing from 3437d59c7393d5fafe151582d285b3665399a7b7 * Add a focus listener interface. * Make focus apply synchronously. * Graphics and input objects for DirectX. diff --git a/src/sdl/sdlimage.cpp b/src/sdl/sdlimage.cpp index 582758a..752fdda 100644 --- a/src/sdl/sdlimage.cpp +++ b/src/sdl/sdlimage.cpp @@ -174,6 +174,11 @@ namespace gcn SDL_FreeSurface(mSurface); mSurface = NULL; + if (tmp == NULL) + { + throw GCN_EXCEPTION("Unable to convert image to display format."); + } + if (hasPink) { SDL_SetColorKey(tmp, SDL_TRUE, @@ -191,7 +196,7 @@ namespace gcn SDL_SetTextureBlendMode(tmpTexture, SDL_BLENDMODE_BLEND); SDL_DestroyTexture(mTexture); mTexture = tmpTexture; - } + } } void SDLImage::free()