=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: d3d9: Do not touch output parameter when d3d9_GetAdapterLUID() fails.
Alexandre Julliard
julliard at winehq.org
Mon Dec 3 15:28:54 CST 2018
Module: wine
Branch: master
Commit: 0035b1109c344b1f18a5ae83711fec81e2877e9e
URL: https://source.winehq.org/git/wine.git/?a=commit;h=0035b1109c344b1f18a5ae83711fec81e2877e9e
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Mon Dec 3 14:41:08 2018 +0100
d3d9: Do not touch output parameter when d3d9_GetAdapterLUID() fails.
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3d9/directx.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c
index 242e36d..4fbf5e9 100644
--- a/dlls/d3d9/directx.c
+++ b/dlls/d3d9/directx.c
@@ -542,9 +542,8 @@ static HRESULT WINAPI d3d9_GetAdapterLUID(IDirect3D9Ex *iface, UINT adapter, LUI
adapter_id.description_size = 0;
adapter_id.device_name_size = 0;
- hr = wined3d_get_adapter_identifier(d3d9->wined3d, adapter, 0, &adapter_id);
-
- *luid = adapter_id.adapter_luid;
+ if (SUCCEEDED(hr = wined3d_get_adapter_identifier(d3d9->wined3d, adapter, 0, &adapter_id)))
+ *luid = adapter_id.adapter_luid;
return hr;
}
More information about the wine-cvs
mailing list