From 8b155708ff69075de2f75cf82c46527d92e51296 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 30 Dec 2024 20:38:09 -0800 Subject: [PATCH] Fixed clipboard memory leak on shutdown --- src/video/SDL_video.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 2b314a4d54..dc04b1405d 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -24,6 +24,7 @@ // The high-level video driver subsystem #include "SDL_sysvideo.h" +#include "SDL_clipboard_c.h" #include "SDL_egl_c.h" #include "SDL_surface_c.h" #include "SDL_pixels_c.h" @@ -4263,6 +4264,8 @@ void SDL_VideoQuit(void) SDL_free(_this->displays); _this->displays = NULL; + SDL_CancelClipboardData(_this->clipboard_sequence); + if (_this->primary_selection_text) { SDL_free(_this->primary_selection_text); _this->primary_selection_text = NULL;