clipboard: Ensure SDL_ClearClipboardData clears data even when no data has been set

This commit is contained in:
Erik Soma authored and Sam Lantinga committed 2025-01-02 07:23:27 -08:00
1 parent f8f8d87bfa
commit c6b5c21aaf
2 files changed
+11 -9

No files matched your search

-5
View File
@@ -99,11 +99,6 @@ bool SDL_SetClipboardData(SDL_ClipboardDataCallback callback, SDL_ClipboardClean
return SDL_SetError("Invalid parameters");
}
if (!callback && !_this->clipboard_callback) {
// Nothing to do, don't modify the system clipboard
return true;
}
SDL_CancelClipboardData(0);
++_this->clipboard_sequence;