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