Module: wine Branch: refs/heads/master Commit: d16c0dc6ce9588f1fabde529390092cb5a2e04df URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=d16c0dc6ce9588f1fabde529...
Author: Robert Shearman rob@codeweavers.com Date: Tue Feb 14 11:34:00 2006 +0100
oleaut32: Free connection point on destruction of the picture object. Handle failure of CreateConnectionPoint on construction.
---
dlls/oleaut32/olepicture.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c index 07b0bb1..b11bc40 100644 --- a/dlls/oleaut32/olepicture.c +++ b/dlls/oleaut32/olepicture.c @@ -279,7 +279,13 @@ static OLEPictureImpl* OLEPictureImpl_Co newObject->lpvtblIPersistStream = &OLEPictureImpl_IPersistStream_VTable; newObject->lpvtblIConnectionPointContainer = &OLEPictureImpl_IConnectionPointContainer_VTable;
+ newObject->pCP = NULL; CreateConnectionPoint((IUnknown*)newObject,&IID_IPropertyNotifySink,&newObject->pCP); + if (!newObject->pCP) + { + HeapFree(GetProcessHeap(), 0, newObject); + return NULL; + }
/* * Start with one reference count. The caller of this function @@ -349,6 +355,9 @@ static void OLEPictureImpl_Destroy(OLEPi { TRACE("(%p)\n", Obj);
+ if (Obj->pCP) + IConnectionPoint_Release(Obj->pCP); + if(Obj->fOwn) { /* We need to destroy the picture */ switch(Obj->desc.picType) { case PICTYPE_BITMAP: