Skip to content

Commit

Permalink
Fixed bug 2956 - De-reference videodata without NULL check in X11_Dis…
Browse files Browse the repository at this point in the history
…patchEvent(_THIS) function
  • Loading branch information
slouken committed Oct 8, 2016
1 parent 93ff12c commit 8b64a78
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/video/x11/SDL_x11events.c
Expand Up @@ -536,14 +536,19 @@ static void
X11_DispatchEvent(_THIS)
{
SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
Display *display = videodata->display;
Display *display;
SDL_WindowData *data;
XEvent xevent;
int orig_event_type;
KeyCode orig_keycode;
XClientMessageEvent m;
int i;

if (!videodata) {
return;
}
display = videodata->display;

SDL_zero(xevent); /* valgrind fix. --ryan. */
X11_XNextEvent(display, &xevent);

Expand Down

0 comments on commit 8b64a78

Please sign in to comment.