https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6a6a28b6349bbdb42bca3…
commit 6a6a28b6349bbdb42bca39a3295b4a2013e9f100
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Wed Jan 29 21:36:08 2020 +0100
Commit: Ioannis Adamopoulos <gadamopoulos(a)reactos.org>
CommitDate: Mon Apr 20 17:36:43 2020 +0300
[SHELL32] Ensure CIDLDataObject::GetData always returns an STGMEDIUM that is safe for
use with ReleaseStgMedium
---
dll/win32/shell32/CIDLDataObj.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dll/win32/shell32/CIDLDataObj.cpp b/dll/win32/shell32/CIDLDataObj.cpp
index 8e1993e2a66..f3366d89a1d 100644
--- a/dll/win32/shell32/CIDLDataObj.cpp
+++ b/dll/win32/shell32/CIDLDataObj.cpp
@@ -236,6 +236,8 @@ HRESULT WINAPI CIDLDataObj::GetData(LPFORMATETC pformatetcIn,
STGMEDIUM *pmedium
GetClipboardFormatNameA (pformatetcIn->cfFormat, szTemp, 256);
TRACE("(%p)->(%p %p format=%s)\n", this, pformatetcIn, pmedium,
szTemp);
}
+ pmedium->hGlobal = NULL;
+ pmedium->pUnkForRelease = NULL;
for (int n = 0; n < m_Formats.GetSize(); ++n)
{
const FORMATETC& fmt = m_Formats[n];