mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-01-31 00:09:19 +01:00
Fixed bug 2956 - De-reference videodata without NULL check in X11_DispatchEvent(_THIS) function
This commit is contained in:
parent
93ff12ce83
commit
8b64a78da9
@ -536,7 +536,7 @@ static void
|
|||||||
X11_DispatchEvent(_THIS)
|
X11_DispatchEvent(_THIS)
|
||||||
{
|
{
|
||||||
SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
|
SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
|
||||||
Display *display = videodata->display;
|
Display *display;
|
||||||
SDL_WindowData *data;
|
SDL_WindowData *data;
|
||||||
XEvent xevent;
|
XEvent xevent;
|
||||||
int orig_event_type;
|
int orig_event_type;
|
||||||
@ -544,6 +544,11 @@ X11_DispatchEvent(_THIS)
|
|||||||
XClientMessageEvent m;
|
XClientMessageEvent m;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (!videodata) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
display = videodata->display;
|
||||||
|
|
||||||
SDL_zero(xevent); /* valgrind fix. --ryan. */
|
SDL_zero(xevent); /* valgrind fix. --ryan. */
|
||||||
X11_XNextEvent(display, &xevent);
|
X11_XNextEvent(display, &xevent);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user