1
0
mirror of https://github.com/narzoul/DDrawCompat synced 2024-12-30 08:55:36 +01:00

Fixed crash at startup in Debug build

See issue #96.
This commit is contained in:
narzoul 2021-05-01 14:11:08 +02:00
parent 7c506d86c9
commit 0ada5acea7

View File

@ -28,7 +28,11 @@ namespace
CompatPtr<TDirect3d> d3d;
HRESULT result = dd->QueryInterface(&dd, Compat::getIntfId<TDirect3d>(),
reinterpret_cast<void**>(&d3d.getRef()));
if (FAILED(result))
if (SUCCEEDED(result))
{
CompatVtable<Vtable<TDirect3d>>::s_origVtable = *d3d.get()->lpVtbl;
}
else
{
Compat::Log() << "ERROR: Failed to create a Direct3D object for hooking: " << Compat::hex(result);
}