[PATCH v2] ole32: Deal with WM_RENDERFORMAT if the clipboard is empty.

Huw Davies huw at codeweavers.com
Tue Jun 9 03:18:39 CDT 2020


From: Zhipeng Zhao <zhaozhipeng at uniontech.com>

Signed-off-by: Zhipeng Zhao <zhaozhipeng at uniontech.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
---
 dlls/ole32/clipboard.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c
index 9df37750a32..cb6770c05b3 100644
--- a/dlls/ole32/clipboard.c
+++ b/dlls/ole32/clipboard.c
@@ -2066,6 +2066,8 @@ static LRESULT CALLBACK clipbrd_wndproc(HWND hwnd, UINT message, WPARAM wparam,
         ole_priv_data_entry *entry;
 
         TRACE("(): WM_RENDERFORMAT(cfFormat=%x)\n", cf);
+
+        if (!clipbrd || !clipbrd->cached_enum) break;
         entry = find_format_in_list(clipbrd->cached_enum->entries, clipbrd->cached_enum->count, cf);
 
         if(entry)
-- 
2.23.0




More information about the wine-devel mailing list