Commit e39fc206 authored by Alexander Scott-Johns's avatar Alexander Scott-Johns Committed by Alexandre Julliard

ole32: Fix error handling in get_data_from_metafilepict and get_data_from_bitmap.

parent 6c6b15f2
...@@ -876,9 +876,8 @@ static HRESULT get_data_from_metafilepict(IDataObject *data, FORMATETC *fmt, HGL ...@@ -876,9 +876,8 @@ static HRESULT get_data_from_metafilepict(IDataObject *data, FORMATETC *fmt, HGL
if(FAILED(hr)) return hr; if(FAILED(hr)) return hr;
hr = dup_metafilepict(med.u.hMetaFilePict, &copy); hr = dup_metafilepict(med.u.hMetaFilePict, &copy);
if(FAILED(hr)) return hr;
*mem = copy; if(SUCCEEDED(hr)) *mem = copy;
ReleaseStgMedium(&med); ReleaseStgMedium(&med);
...@@ -906,10 +905,8 @@ static HRESULT get_data_from_bitmap(IDataObject *data, FORMATETC *fmt, HBITMAP * ...@@ -906,10 +905,8 @@ static HRESULT get_data_from_bitmap(IDataObject *data, FORMATETC *fmt, HBITMAP *
if(FAILED(hr)) return hr; if(FAILED(hr)) return hr;
hr = dup_bitmap(med.u.hBitmap, &copy); hr = dup_bitmap(med.u.hBitmap, &copy);
if(FAILED(hr)) return hr;
if(hbm) *hbm = copy; if(SUCCEEDED(hr)) *hbm = copy;
else hr = E_FAIL;
ReleaseStgMedium(&med); ReleaseStgMedium(&med);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment