diff options
Diffstat (limited to 'embeddedobj')
-rw-r--r-- | embeddedobj/source/msole/olecomponent.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx index bcf2600236c1..f9440f651bb2 100644 --- a/embeddedobj/source/msole/olecomponent.cxx +++ b/embeddedobj/source/msole/olecomponent.cxx @@ -913,8 +913,8 @@ void OleComponent::InitEmbeddedCopyOfLink( OleComponent const * pOleLinkComponen if ( SUCCEEDED( hr ) && aMonType == MKSYS_FILEMONIKER ) { ComSmart< IMalloc > pMalloc; - CoGetMalloc( 1, &pMalloc ); // if fails there will be a memory leak - OSL_ENSURE( pMalloc, "CoGetMalloc() failed!" ); + hr = CoGetMalloc( 1, &pMalloc ); // if fails there will be a memory leak + OSL_ENSURE(SUCCEEDED(hr) && pMalloc, "CoGetMalloc() failed!"); LPOLESTR pOleStr = nullptr; hr = pOleLink->GetSourceDisplayName( &pOleStr ); |