Eric Pouech : riched20: Don't crash when no OLE obj is present.
Module: wine Branch: master Commit: 015aae30cf2217164f631d1c03abfc9ea63bb43d URL: https://gitlab.winehq.org/wine/wine/-/commit/015aae30cf2217164f631d1c03abfc9... Author: Eric Pouech <epouech(a)codeweavers.com> Date: Wed Dec 13 10:41:41 2023 +0100 riched20: Don't crash when no OLE obj is present. This was generating a lot of crashes in riched20 tests. Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- dlls/riched20/richole.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c index 5bc1c30c1f2..51ae41d2fe7 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c @@ -5799,6 +5799,8 @@ void draw_ole( ME_Context *c, int x, int y, ME_Run *run, BOOL selected ) assert(run->nFlags & MERF_GRAPHICS); assert(run->reobj); + if (!run->reobj->obj.poleobj) return; + if (SUCCEEDED(IOleObject_QueryInterface(run->reobj->obj.poleobj, &IID_IViewObject, (void**)&ivo))) { HRESULT hr;
participants (1)
-
Alexandre Julliard