Explorar o código

Fixed warning C6011: Dereferencing NULL pointer 'display'.

Sam Lantinga %!s(int64=2) %!d(string=hai) anos
pai
achega
4ccc53edfe
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/video/SDL_video.c

+ 1 - 1
src/video/SDL_video.c

@@ -1508,7 +1508,7 @@ static int SDL_UpdateFullscreenMode(SDL_Window *window, SDL_bool fullscreen)
                 break;
             }
         }
-        if (i == _this->num_displays) {
+        if (!display || i == _this->num_displays) {
             /* Already not fullscreen on any display */
             goto done;
         }