From 5b1520761da33f2490bff02905a2837e83035b3c Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Mon, 20 Oct 2008 15:28:03 +0100 Subject: [PATCH] ole32: Call the object's IPersistStorage_InitNew() if the object is running. --- dlls/ole32/defaulthandler.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/ole32/defaulthandler.c b/dlls/ole32/defaulthandler.c index b20cb0186e5..f30033097cc 100644 --- a/dlls/ole32/defaulthandler.c +++ b/dlls/ole32/defaulthandler.c @@ -1529,9 +1529,17 @@ static HRESULT WINAPI DefaultHandler_IPersistStorage_InitNew( IPersistStorage* iface, IStorage* pStg) { - DefaultHandler *This = impl_from_IPersistStorage(iface); + DefaultHandler *This = impl_from_IPersistStorage(iface); + HRESULT hr; - return IPersistStorage_InitNew(This->dataCache_PersistStg, pStg); + TRACE("(%p)->(%p)\n", iface, pStg); + + hr = IPersistStorage_InitNew(This->dataCache_PersistStg, pStg); + + if(SUCCEEDED(hr) && object_is_running(This)) + hr = IPersistStorage_InitNew(This->pPSDelegate, pStg); + + return hr; }