ole32: Fix OleDraw() with NULL pUnk.
This commit is contained in:
parent
533df157f8
commit
9b90ea557b
|
@ -2546,6 +2546,8 @@ HRESULT WINAPI OleDraw(
|
|||
HRESULT hres;
|
||||
IViewObject *viewobject;
|
||||
|
||||
if (!pUnk) return E_INVALIDARG;
|
||||
|
||||
hres = IUnknown_QueryInterface(pUnk,
|
||||
&IID_IViewObject,
|
||||
(void**)&viewobject);
|
||||
|
|
|
@ -1934,9 +1934,16 @@ static void test_OleLockRunning(void)
|
|||
static void test_OleDraw(void)
|
||||
{
|
||||
HRESULT hr;
|
||||
RECT rect;
|
||||
|
||||
hr = OleDraw((IUnknown*)&viewobject, 0, (HDC)0x1, NULL);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
hr = OleDraw(NULL, 0, (HDC)0x1, NULL);
|
||||
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
|
||||
|
||||
hr = OleDraw(NULL, 0, (HDC)0x1, &rect);
|
||||
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
|
||||
}
|
||||
|
||||
START_TEST(ole2)
|
||||
|
|
Loading…
Reference in New Issue