mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-12-28 17:14:38 +00:00
Fixed crash getting clipboard data processing clipboard events on X11
SDL_PumpEvents() was freeing the temporary memory in the clipboard event, so if the application was iterating over the mime types in the event and retrieving the clipboard data, it would crash after the first entry.
(cherry picked from commit 3c0a6c32d4)
This commit is contained in:
@@ -139,7 +139,7 @@ static bool WaitForSelection(SDL_VideoDevice *_this, Atom selection_type, bool *
|
||||
waitStart = SDL_GetTicks();
|
||||
*flag = true;
|
||||
while (*flag) {
|
||||
SDL_PumpEvents();
|
||||
X11_PumpEvents(_this);
|
||||
waitElapsed = SDL_GetTicks() - waitStart;
|
||||
// Wait one second for a selection response.
|
||||
if (waitElapsed > 1000) {
|
||||
|
||||
Reference in New Issue
Block a user