mirror of
https://github.com/yawut/SDL.git
synced 2026-04-23 00:57:24 -05:00
Date: Sun, 14 Sep 2003 17:04:55 -0400
From: Philip D.S. Thoren <pthoren@cs.uml.edu>
Reply-To: "sdl@libsdl.org" <sdl@libsdl.org>
To: "sdl@libsdl.org" <sdl@libsdl.org>
Subject: [SDL] BUG in src/video/windx5/SDL_dx5events.c
I tracked down a bug that crashed my program on Windows *all* the
time.
FILE: src/video/windx5/SDL_dx5events.c
FUNCTION: handle_mouse
BUG:
SDL_PublicSurface is being dereferenced when it is NULL.
I added the following to the very begining of handle_mouse
and it solved my crashing problems:
if (SDL_PublicSurface == NULL) return;
~ Philip D.S. Thoren
This commit is contained in:
parent
59afd118c0
commit
c827687714
|
|
@ -277,6 +277,11 @@ static void handle_mouse(const int numevents, DIDEVICEOBJECTDATA *ptrbuf)
|
|||
Uint8 button;
|
||||
DWORD timestamp = 0;
|
||||
|
||||
/* Sanity check. Mailing list reports this being NULL unexpectedly. */
|
||||
if (SDL_PublicSurface == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* If we are in windowed mode, Windows is taking care of the mouse */
|
||||
if ( (SDL_PublicSurface->flags & SDL_OPENGL) ||
|
||||
!(SDL_PublicSurface->flags & SDL_FULLSCREEN) ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user