- This->txtSel->reOle = NULL;This can't happen.
- ITextSelection_Release(&This->txtSel->ITextSelection_iface);
- IOleClientSite_Release(&This->clientSite->IOleClientSite_iface);
+ if(This->txtSel)
+ {
+ This->txtSel->reOle = NULL;
+ ITextSelection_Release(&This->txtSel->ITextSelection_iface);
+ }
+ if(This->clientSite)
+ {
+ This->clientSite->reOle = NULL;
+ IOleClientSite_Release(&This->clientSite->IOleClientSite_iface);
+ }
heap_fr
IOleClientSiteImpl *This = impl_from_IOleClientSite(iface);Why do you need this?
ULONG ref = InterlockedDecrement(&This->ref);
if (ref == 0)
+ {
+ if(This->reOle)
+ This->reOle->clientSite = NULL;
heap_free(This);
+ }
return ref;