diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c index 5a2ae42795..b63b2a0eb9 100644 --- a/src/video/x11/SDL_x11events.c +++ b/src/video/x11/SDL_x11events.c @@ -947,6 +947,9 @@ static void X11_HandleClipboardEvent(SDL_VideoDevice *_this, const XEvent *xeven new_mime_types[length] = NULL; SDL_SendClipboardUpdate(false, new_mime_types, length); + + // Clear the internal selection source data, as it was invalided after updating the clipboard. + SDL_zero(videodata->clipboard); } if (data) {