From: Thomas Faber Date: Tue, 13 Jun 2017 14:11:26 +0000 (+0000) Subject: [WIN32K:NTUSER] X-Git-Tag: ReactOS-0.4.6~325 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=eb3f29d2ad443404931c628289dea74f4f9e100c;ds=sidebyside [WIN32K:NTUSER] - Fail UserSetClipboardData in case of 0 format, as shown by user32:clipboard test svn path=/trunk/; revision=75024 --- diff --git a/reactos/win32ss/user/ntuser/clipboard.c b/reactos/win32ss/user/ntuser/clipboard.c index 068dc5d5f87..672631ca346 100644 --- a/reactos/win32ss/user/ntuser/clipboard.c +++ b/reactos/win32ss/user/ntuser/clipboard.c @@ -993,7 +993,8 @@ UserSetClipboardData(UINT fmt, HANDLE hData, PSETCLIPBDATA scd) * - in case of delayed rendering, the clipboard must be already opened * by another application, but we need to be the clipboard owner. */ - if ((!pWinStaObj->fInDelayedRendering && !IntIsClipboardOpenByMe(pWinStaObj)) || + if (!fmt || + (!pWinStaObj->fInDelayedRendering && !IntIsClipboardOpenByMe(pWinStaObj)) || (pWinStaObj->fInDelayedRendering && !(pWinStaObj->ptiClipLock && pWinStaObj->spwndClipOwner->head.pti == PsGetCurrentThreadWin32Thread()))) {