mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-01-06 21:37:47 +00:00
Fixed crash if X11 initialization fails
This commit is contained in:
@@ -536,8 +536,10 @@ void X11_QuitMouse(SDL_VideoDevice *_this)
|
||||
int j;
|
||||
|
||||
for (j = 0; j < SDL_arraysize(sys_cursors); j++) {
|
||||
X11_FreeCursor(sys_cursors[j]);
|
||||
sys_cursors[j] = NULL;
|
||||
if (sys_cursors[j]) {
|
||||
X11_FreeCursor(sys_cursors[j]);
|
||||
sys_cursors[j] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = data->mouse_device_info; i; i = next) {
|
||||
|
||||
Reference in New Issue
Block a user