ole32: Fix error handling in get_data_from_metafilepict and get_data_from_bitmap.
This commit is contained in:
parent
6c6b15f2d4
commit
e39fc20638
|
@ -876,9 +876,8 @@ static HRESULT get_data_from_metafilepict(IDataObject *data, FORMATETC *fmt, HGL
|
|||
if(FAILED(hr)) return hr;
|
||||
|
||||
hr = dup_metafilepict(med.u.hMetaFilePict, ©);
|
||||
if(FAILED(hr)) return hr;
|
||||
|
||||
*mem = copy;
|
||||
if(SUCCEEDED(hr)) *mem = copy;
|
||||
|
||||
ReleaseStgMedium(&med);
|
||||
|
||||
|
@ -906,10 +905,8 @@ static HRESULT get_data_from_bitmap(IDataObject *data, FORMATETC *fmt, HBITMAP *
|
|||
if(FAILED(hr)) return hr;
|
||||
|
||||
hr = dup_bitmap(med.u.hBitmap, ©);
|
||||
if(FAILED(hr)) return hr;
|
||||
|
||||
if(hbm) *hbm = copy;
|
||||
else hr = E_FAIL;
|
||||
if(SUCCEEDED(hr)) *hbm = copy;
|
||||
|
||||
ReleaseStgMedium(&med);
|
||||
|
||||
|
|
Loading…
Reference in New Issue