riched20: Avoid invalid memory access.

This commit is contained in:
Jactry Zeng 2014-09-15 10:49:21 +08:00 committed by Alexandre Julliard
parent e777e9d1ba
commit 7d06f6ccb2
1 changed files with 5 additions and 2 deletions

View File

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