Module: wine Branch: master Commit: 5b1520761da33f2490bff02905a2837e83035b3c URL: http://source.winehq.org/git/wine.git/?a=commit;h=5b1520761da33f2490bff02905...
Author: Huw Davies huw@codeweavers.com Date: Mon Oct 20 15:28:03 2008 +0100
ole32: Call the object's IPersistStorage_InitNew() if the object is running.
---
dlls/ole32/defaulthandler.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/ole32/defaulthandler.c b/dlls/ole32/defaulthandler.c index b20cb01..f300330 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; + + TRACE("(%p)->(%p)\n", iface, pStg);
- return IPersistStorage_InitNew(This->dataCache_PersistStg, pStg); + hr = IPersistStorage_InitNew(This->dataCache_PersistStg, pStg); + + if(SUCCEEDED(hr) && object_is_running(This)) + hr = IPersistStorage_InitNew(This->pPSDelegate, pStg); + + return hr; }