d3d10_1: Validate parameters in D3D10CreateDevice1().

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2016-03-04 11:43:32 +01:00 committed by Alexandre Julliard
parent cd8be0b431
commit 59193b0c47
1 changed files with 8 additions and 0 deletions

View File

@ -73,6 +73,14 @@ HRESULT WINAPI D3D10CreateDevice1(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE drive
adapter, debug_d3d10_driver_type(driver_type), swrast, flags,
debug_d3d10_feature_level(hw_level), sdk_version, device);
if (!device)
return E_INVALIDARG;
*device = NULL;
if (!hw_level)
return E_INVALIDARG;
if (adapter)
{
IDXGIAdapter_AddRef(adapter);