Minor crash bugfix
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%4035
This commit is contained in:
parent
7e81fd927f
commit
0445aeab47
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue