32bffb77
by Aaron Yourk at 2026-05-19T23:19:09+02:00
ole32: Validate cached clipboard window handle in get_clipbrd_window.
The OLE clipboard caches a per-process window handle. When the STA
thread that created this window terminates, the window is destroyed
but the stale handle remains cached. Subsequent OleSetClipboard
calls use this stale handle, causing OpenClipboard to fail with
CLIPBRD_E_CANT_OPEN.
Check whether the cached window is still valid using IsWindow()
before returning it. If the window has been destroyed, clear the
cache so a fresh window is created on the current thread.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=59519