d3dxof: Prevent accessing pobj when it is null. This can happend on error.

This commit is contained in:
Christian Costa 2012-01-22 17:58:56 +01:00 committed by Alexandre Julliard
parent 310c174eee
commit 0eb9740e79

View File

@ -522,8 +522,11 @@ static ULONG WINAPI IDirectXFileDataImpl_Release(IDirectXFileData* iface)
if (!This->level && !This->from_ref)
{
HeapFree(GetProcessHeap(), 0, This->pstrings);
HeapFree(GetProcessHeap(), 0, This->pobj->pdata);
HeapFree(GetProcessHeap(), 0, This->pobj);
if (This->pobj)
{
HeapFree(GetProcessHeap(), 0, This->pobj->pdata);
HeapFree(GetProcessHeap(), 0, This->pobj);
}
}
HeapFree(GetProcessHeap(), 0, This);
}