Skip to content

Commit

Permalink
Minor crash bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Lantinga committed May 23, 2001
1 parent 652b66d commit 04d2109
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/video/SDL_video.c
Expand Up @@ -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;
Expand Down

0 comments on commit 04d2109

Please sign in to comment.