don't call SetWindowGammaRamp without sdl_window

This commit is contained in:
rakslice 2020-08-18 20:53:39 -07:00
parent ba111a5cb7
commit 639f05da7e
1 changed files with 1 additions and 1 deletions

View File

@ -1787,7 +1787,7 @@ void SDL_monitor_desc::set_palette(uint8 *pal, int num_in)
memcmp(green, last_gamma_green, 512) != 0 ||
memcmp(blue, last_gamma_blue, 512) != 0);
if (changed) {
if (changed && sdl_window) {
int result = SDL_SetWindowGammaRamp(sdl_window, red, green, blue);
if (result < 0) {