From e6008ea636870a502361084afbd113ff7ce08487 Mon Sep 17 00:00:00 2001 From: Mark Jansen Date: Fri, 18 Aug 2017 17:18:46 +0000 Subject: [PATCH] [OLE32] Do not crash on an invalid / empty clipboard. CORE-12302 svn path=/trunk/; revision=75617 --- reactos/dll/win32/ole32/clipboard.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/ole32/clipboard.c b/reactos/dll/win32/ole32/clipboard.c index 6ea2d4aada5..8f526c79308 100644 --- a/reactos/dll/win32/ole32/clipboard.c +++ b/reactos/dll/win32/ole32/clipboard.c @@ -2018,6 +2018,10 @@ static LRESULT CALLBACK clipbrd_wndproc(HWND hwnd, UINT message, WPARAM wparam, { case WM_RENDERFORMAT: { +#ifdef __REACTOS__ + if (clipbrd->cached_enum) + { +#endif UINT cf = wparam; ole_priv_data_entry *entry; @@ -2026,7 +2030,9 @@ static LRESULT CALLBACK clipbrd_wndproc(HWND hwnd, UINT message, WPARAM wparam, if(entry) render_format(clipbrd->src_data, &entry->fmtetc); - +#ifdef __REACTOS__ + } +#endif break; }