Minor crash bugfix

This commit is contained in:
Sam Lantinga
2001-05-23 00:06:08 +00:00
parent 9095cc7e0b
commit 6c2c44ddc9

View File

@@ -1134,6 +1134,9 @@ int SDL_SetPalette(SDL_Surface *screen, int which,
int gotall;
int palsize;
if ( ! current_video ) {
return 0;
}
if ( screen != SDL_PublicSurface ) {
/* only screens have physical palettes */
which &= ~SDL_PHYSPAL;