https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1f362c1a5a242b6608d2b…
commit 1f362c1a5a242b6608d2b9663593aecce22407a5
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Sun Oct 20 14:21:28 2019 +0200
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Oct 20 17:10:12 2019 +0200
[SHELL32] CDefaultContextMenu: Don't render a medium just to query if it is
present
---
dll/win32/shell32/CDefaultContextMenu.cpp | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/dll/win32/shell32/CDefaultContextMenu.cpp
b/dll/win32/shell32/CDefaultContextMenu.cpp
index d64d9423ff0..aa250481a08 100644
--- a/dll/win32/shell32/CDefaultContextMenu.cpp
+++ b/dll/win32/shell32/CDefaultContextMenu.cpp
@@ -325,18 +325,13 @@ HasClipboardData()
if (SUCCEEDED(OleGetClipboard(&pDataObj)))
{
- STGMEDIUM medium;
FORMATETC formatetc;
TRACE("pDataObj=%p\n", pDataObj.p);
/* Set the FORMATETC structure*/
InitFormatEtc(formatetc, RegisterClipboardFormatW(CFSTR_SHELLIDLIST),
TYMED_HGLOBAL);
- if (SUCCEEDED(pDataObj->GetData(&formatetc, &medium)))
- {
- bRet = TRUE;
- ReleaseStgMedium(&medium);
- }
+ bRet = SUCCEEDED(pDataObj->QueryGetData(&formatetc));
}
return bRet;