Commit bc1ba439 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3dx9: Check for successful sprite draw in DrawTextW().

parent 8e48d7fd
......@@ -656,6 +656,7 @@ static INT WINAPI ID3DXFontImpl_DrawTextW(ID3DXFont *iface, ID3DXSprite *sprite,
unsigned int count;
RECT r = {0};
WCHAR *line;
HRESULT hr;
SIZE size;
TRACE("iface %p, sprite %p, string %s, in_count %d, rect %s, format %#lx, color 0x%08lx.\n",
......@@ -775,8 +776,14 @@ static INT WINAPI ID3DXFontImpl_DrawTextW(ID3DXFont *iface, ID3DXSprite *sprite,
black_box.bottom = black_box.top + rect->bottom - pos.y;
}
ID3DXSprite_Draw(target, texture, &black_box, NULL, &pos, color);
hr = ID3DXSprite_Draw(target, texture, &black_box, NULL, &pos, color);
IDirect3DTexture9_Release(texture);
if (FAILED(hr))
{
free(results.lpCaretPos);
free(results.lpGlyphs);
goto cleanup;
}
}
free(results.lpCaretPos);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment