# HG changeset patch # User Sam Lantinga # Date 1201240088 0 # Node ID 8797fa6e2fb27dd3cf9861511bdc4f8c21bc98bd # Parent cd98d1dc385c06b9d0edff7226aceafc349801f6 Fixed crash in SDL_SetGammaRamp() diff -r cd98d1dc385c -r 8797fa6e2fb2 src/video/windib/SDL_dibvideo.c --- a/src/video/windib/SDL_dibvideo.c Thu Jan 24 15:50:20 2008 +0000 +++ b/src/video/windib/SDL_dibvideo.c Fri Jan 25 05:48:08 2008 +0000 @@ -784,8 +784,10 @@ if ( screen_pal && (flags & (SDL_FULLSCREEN|SDL_HWPALETTE)) ) { grab_palette = TRUE; } - /* BitBlt() maps colors for us */ - video->flags |= SDL_HWPALETTE; + if ( screen_pal ) { + /* BitBlt() maps colors for us */ + video->flags |= SDL_HWPALETTE; + } } #ifndef _WIN32_WCE /* Resize the window */