Module: wine Branch: master Commit: 8d25534613198d409ad8f06ca678a91c20c98eba URL: http://source.winehq.org/git/wine.git/?a=commit;h=8d25534613198d409ad8f06ca6...
Author: Marcus Meissner marcus@jet.franken.de Date: Thu Sep 16 17:12:33 2010 +0200
ole32: Check for interface NULL which happens with e.g. Abiword.
---
dlls/ole32/ole2.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c index a9a4885..84bf174 100644 --- a/dlls/ole32/ole2.c +++ b/dlls/ole32/ole2.c @@ -450,7 +450,9 @@ HRESULT WINAPI RegisterDragDrop(HWND hwnd, LPDROPTARGET pDropTarget) hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); if(FAILED(hr)) return hr;
+ unk = NULL; hr = IDropTarget_QueryInterface(pDropTarget, &IID_IUnknown, (void**)&unk); + if (SUCCEEDED(hr) && !unk) hr = E_NOINTERFACE; if(FAILED(hr)) { IStream_Release(stream);