瀏覽代碼

Fixed warning C6011: Dereferencing NULL pointer 'display'.

Sam Lantinga 2 年之前
父節點
當前提交
4ccc53edfe
共有 1 個文件被更改,包括 1 次插入1 次删除
  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;
         }