فهرست منبع

x11: Check for a valid video device pointer before dereferencing the name

Frank Praznik 6 روز پیش
والد
کامیت
95c0b49de0
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/video/x11/SDL_x11messagebox.c

+ 1 - 1
src/video/x11/SDL_x11messagebox.c

@@ -307,7 +307,7 @@ static bool X11_ShowMessageBoxImpl(const SDL_MessageBoxData *messageboxdata, int
     }
 
     /* Create window */
-    if (messageboxdata->window && SDL_strcmp(video->name, "x11") == 0) {
+    if (messageboxdata->window && video && SDL_strcmp(video->name, "x11") == 0) {
         // Only use the window as a parent if it is from the X11 driver.
         parent_window = messageboxdata->window;
     }