Zhipeng Zhao : ole32: Deal with WM_RENDERFORMAT if the clipboard is empty.

Alexandre Julliard julliard at winehq.org
Tue Jun 9 15:27:45 CDT 2020


Module: wine
Branch: master
Commit: 065b56e4e1c0c67862345496cfb1a1df53f8ee95
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=065b56e4e1c0c67862345496cfb1a1df53f8ee95

Author: Zhipeng Zhao <zhaozhipeng at uniontech.com>
Date:   Tue Jun  9 09:18:39 2020 +0100

ole32: Deal with WM_RENDERFORMAT if the clipboard is empty.

Signed-off-by: Zhipeng Zhao <zhaozhipeng at uniontech.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ole32/clipboard.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c
index 9df37750a3..cb6770c05b 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)




More information about the wine-cvs mailing list