RPI_FreeCursor: set global_cursor to NULL to prevent double-free (bug 4769)

This commit is contained in:
Ozkan Sezer 2019-08-26 18:41:40 +03:00 committed by Conn O'Griofa
parent c7e1c332e3
commit c9f99401db

View file

@ -226,6 +226,9 @@ RPI_FreeCursor(SDL_Cursor * cursor)
SDL_free(cursor->driverdata);
}
SDL_free(cursor);
if (cursor == global_cursor) {
global_cursor = NULL;
}
}
}