From 06946793b42fd57d8146b66bc190235a4ef707ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=BCrrenberger?= Date: Sat, 25 May 2024 00:30:51 +0200 Subject: [PATCH] Close the clipboard if we fail to empty it --- src/SFML/Window/Win32/ClipboardImpl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SFML/Window/Win32/ClipboardImpl.cpp b/src/SFML/Window/Win32/ClipboardImpl.cpp index 7353af9aa..1ad613abc 100644 --- a/src/SFML/Window/Win32/ClipboardImpl.cpp +++ b/src/SFML/Window/Win32/ClipboardImpl.cpp @@ -81,6 +81,7 @@ void ClipboardImpl::setString(const String& text) if (!EmptyClipboard()) { std::cerr << "Failed to empty the Win32 clipboard." << std::endl; + CloseClipboard(); return; }