Vincent Povirk : ole32: Always return false when asked if NULL is the current clipboard.
Alexandre Julliard
julliard at winehq.org
Mon Jul 21 08:52:04 CDT 2008
Module: wine
Branch: master
Commit: a0249babcd5124ef283822fb8699ea96e600a020
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a0249babcd5124ef283822fb8699ea96e600a020
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Thu Jul 17 17:33:48 2008 -0500
ole32: Always return false when asked if NULL is the current clipboard.
---
dlls/ole32/clipboard.c | 3 +++
dlls/ole32/tests/clipboard.c | 2 +-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c
index a74e71a..909b215 100644
--- a/dlls/ole32/clipboard.c
+++ b/dlls/ole32/clipboard.c
@@ -583,6 +583,9 @@ HRESULT WINAPI OleIsCurrentClipboard(IDataObject *pDataObject)
if (!theOleClipboard)
return E_OUTOFMEMORY;
+ if (pDataObject == NULL)
+ return S_FALSE;
+
return (pDataObject == theOleClipboard->pIDataObjectSrc) ? S_OK : S_FALSE;
}
diff --git a/dlls/ole32/tests/clipboard.c b/dlls/ole32/tests/clipboard.c
index c231d49..ee912ce 100644
--- a/dlls/ole32/tests/clipboard.c
+++ b/dlls/ole32/tests/clipboard.c
@@ -472,7 +472,7 @@ static void test_set_clipboard(void)
hr = OleIsCurrentClipboard(data2);
ok(hr == S_FALSE, "did not expect current clipboard to be data2, hr = 0x%08x\n", hr);
hr = OleIsCurrentClipboard(NULL);
- todo_wine ok(hr == S_FALSE, "expect S_FALSE, hr = 0x%08x\n", hr);
+ ok(hr == S_FALSE, "expect S_FALSE, hr = 0x%08x\n", hr);
ok(OleSetClipboard(NULL) == S_OK, "failed to clear clipboard, hr = 0x%08x\n", hr);
More information about the wine-cvs
mailing list