Commit 015aae30 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

riched20: Don't crash when no OLE obj is present.

This was generating a lot of crashes in riched20 tests. Signed-off-by: 's avatarEric Pouech <epouech@codeweavers.com>
parent 7b947654
...@@ -5799,6 +5799,8 @@ void draw_ole( ME_Context *c, int x, int y, ME_Run *run, BOOL selected ) ...@@ -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->nFlags & MERF_GRAPHICS);
assert(run->reobj); assert(run->reobj);
if (!run->reobj->obj.poleobj) return;
if (SUCCEEDED(IOleObject_QueryInterface(run->reobj->obj.poleobj, &IID_IViewObject, (void**)&ivo))) if (SUCCEEDED(IOleObject_QueryInterface(run->reobj->obj.poleobj, &IID_IViewObject, (void**)&ivo)))
{ {
HRESULT hr; HRESULT hr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment