RPI_FreeCursor: set global_cursor to NULL to prevent double-free (bug 4769)
This commit is contained in:
parent
c7e1c332e3
commit
c9f99401db
1 changed files with 3 additions and 0 deletions
|
@ -226,6 +226,9 @@ RPI_FreeCursor(SDL_Cursor * cursor)
|
|||
SDL_free(cursor->driverdata);
|
||||
}
|
||||
SDL_free(cursor);
|
||||
if (cursor == global_cursor) {
|
||||
global_cursor = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue