Commit 0445aeab authored by Sam Lantinga's avatar Sam Lantinga

Minor crash bugfix

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%4035
parent 7e81fd92
...@@ -1134,6 +1134,9 @@ int SDL_SetPalette(SDL_Surface *screen, int which, ...@@ -1134,6 +1134,9 @@ int SDL_SetPalette(SDL_Surface *screen, int which,
int gotall; int gotall;
int palsize; int palsize;
if ( ! current_video ) {
return 0;
}
if ( screen != SDL_PublicSurface ) { if ( screen != SDL_PublicSurface ) {
/* only screens have physical palettes */ /* only screens have physical palettes */
which &= ~SDL_PHYSPAL; which &= ~SDL_PHYSPAL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment