RPI_FreeCursor: set global_cursor to NULL to prevent double-free (bug 4769)
parent
2cb26188e1
commit
1e47790c8d
|
@ -226,6 +226,9 @@ RPI_FreeCursor(SDL_Cursor * cursor)
|
|||
SDL_free(cursor->driverdata);
|
||||
}
|
||||
SDL_free(cursor);
|
||||
if (cursor == global_cursor) {
|
||||
global_cursor = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue