Fixed bug #7302 - Memory 'leak' in SDL_SetMouseSystemScale()

This commit is contained in:
Sylvain 2023-02-13 09:40:44 +01:00 committed by Sylvain Becker
parent 236d26b480
commit 93ed3148ba
1 changed files with 6 additions and 0 deletions

View File

@ -851,6 +851,12 @@ void SDL_QuitMouse(void)
}
mouse->num_clickstates = 0;
if (mouse->system_scale_values) {
SDL_free(mouse->system_scale_values);
mouse->system_scale_values = NULL;
}
mouse->num_system_scale_values = 0;
SDL_DelHintCallback(SDL_HINT_MOUSE_DOUBLE_CLICK_TIME,
SDL_MouseDoubleClickTimeChanged, mouse);