Commit 7d06f6cc authored by Jactry Zeng's avatar Jactry Zeng Committed by Alexandre Julliard

riched20: Avoid invalid memory access.

parent e777e9d1
...@@ -492,8 +492,11 @@ static ULONG WINAPI ITextRange_fnRelease(ITextRange *me) ...@@ -492,8 +492,11 @@ static ULONG WINAPI ITextRange_fnRelease(ITextRange *me)
TRACE ("%p ref=%u\n", This, ref); TRACE ("%p ref=%u\n", This, ref);
if (ref == 0) if (ref == 0)
{ {
This->reOle = NULL; if (This->reOle)
list_remove(&This->entry); {
list_remove(&This->entry);
This->reOle = NULL;
}
heap_free(This); heap_free(This);
} }
return ref; return ref;
......
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