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)
TRACE ("%p ref=%u\n", This, ref);
if (ref == 0)
{
This->reOle = NULL;
list_remove(&This->entry);
if (This->reOle)
{
list_remove(&This->entry);
This->reOle = NULL;
}
heap_free(This);
}
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