Fixed crash in SDL_SetGammaRamp() SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Fri, 25 Jan 2008 05:48:08 +0000
branchSDL-1.2
changeset 41368797fa6e2fb2
parent 4135 cd98d1dc385c
child 4137 be12463f31ea
Fixed crash in SDL_SetGammaRamp()
src/video/windib/SDL_dibvideo.c
     1.1 --- a/src/video/windib/SDL_dibvideo.c	Thu Jan 24 15:50:20 2008 +0000
     1.2 +++ b/src/video/windib/SDL_dibvideo.c	Fri Jan 25 05:48:08 2008 +0000
     1.3 @@ -784,8 +784,10 @@
     1.4  		if ( screen_pal && (flags & (SDL_FULLSCREEN|SDL_HWPALETTE)) ) {
     1.5  			grab_palette = TRUE;
     1.6  		}
     1.7 -		/* BitBlt() maps colors for us */
     1.8 -		video->flags |= SDL_HWPALETTE;
     1.9 +		if ( screen_pal ) {
    1.10 +			/* BitBlt() maps colors for us */
    1.11 +			video->flags |= SDL_HWPALETTE;
    1.12 +		}
    1.13  	}
    1.14  #ifndef _WIN32_WCE
    1.15  	/* Resize the window */