diff --git a/dlls/oleacc/main.c b/dlls/oleacc/main.c index 18a43fb4c06..e5fe6cdb406 100644 --- a/dlls/oleacc/main.c +++ b/dlls/oleacc/main.c @@ -219,10 +219,10 @@ HRESULT WINAPI ObjectFromLresult( LRESULT result, REFIID riid, WPARAM wParam, vo return E_FAIL; data = GlobalAlloc(GMEM_FIXED, size); - memcpy(data, view, size); - UnmapViewOfFile(view); if(!data) return E_OUTOFMEMORY; + memcpy(data, view, size); + UnmapViewOfFile(view); hr = CreateStreamOnHGlobal(data, TRUE, &stream); if(FAILED(hr)) {