dwrite: Explicitly check rendering parameters pointer passed to DrawGlyphRun().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1e5b9d369b
commit
cef8a52dea
|
@ -328,6 +328,9 @@ static HRESULT WINAPI rendertarget_DrawGlyphRun(IDWriteBitmapRenderTarget1 *ifac
|
|||
if (!This->dib.ptr)
|
||||
return S_OK;
|
||||
|
||||
if (!params)
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (FAILED(hr = IDWriteFontFace_QueryInterface(run->fontFace, &IID_IDWriteFontFace2, (void **)&fontface2))) {
|
||||
WARN("Failed to get IDWriteFontFace2 interface, hr %#x.\n", hr);
|
||||
return hr;
|
||||
|
|
|
@ -1337,7 +1337,6 @@ static void test_CreateBitmapRenderTarget(void)
|
|||
|
||||
hr = IDWriteBitmapRenderTarget_DrawGlyphRun(target, 0.0f, 0.0f, DWRITE_MEASURING_MODE_NATURAL,
|
||||
&run, NULL, RGB(255, 0, 0), NULL);
|
||||
todo_wine
|
||||
ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IDWriteBitmapRenderTarget_DrawGlyphRun(target, 0.0f, 0.0f, DWRITE_MEASURING_MODE_GDI_NATURAL + 1,
|
||||
|
|
Loading…
Reference in New Issue