浏览代码

X11_WaitEventTimeout: remove unreachable return

If that condition was reachable, the return value should be negative to indicate that waiting for the timeout failed.
Otherwise, SDL_WaitEventTimeout would incorrectly return early.
rohlem 3 年之前
父节点
当前提交
0403fa8aa6
共有 1 个文件被更改,包括 0 次插入4 次删除
  1. 0 4
      src/video/x11/SDL_x11events.c

+ 0 - 4
src/video/x11/SDL_x11events.c

@@ -1602,10 +1602,6 @@ X11_WaitEventTimeout(_THIS, int timeout)
     SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
     SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
     Display *display;
     Display *display;
     XEvent xevent;
     XEvent xevent;
-
-    if (!videodata) {
-        return 0;
-    }
     display = videodata->display;
     display = videodata->display;
 
 
     SDL_zero(xevent);
     SDL_zero(xevent);