From ed6a644fc32f8606087d6fc0d698c5c07f6f154a Mon Sep 17 00:00:00 2001 From: Matt Coffin Date: Sun, 16 Aug 2020 12:21:46 -0600 Subject: [PATCH] vrclient: Fix segfault on NULL texture handles This fixes a crash on startup for Assetto Corsa Competizione (805550) --- vrclient_x64/vrclient_x64/vrclient_main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vrclient_x64/vrclient_x64/vrclient_main.c b/vrclient_x64/vrclient_x64/vrclient_main.c index e316a596..d3764384 100644 --- a/vrclient_x64/vrclient_x64/vrclient_main.c +++ b/vrclient_x64/vrclient_x64/vrclient_main.c @@ -908,6 +908,11 @@ EVRCompositorError ivrcompositor_submit( { TRACE("D3D11\n"); + if (!texture->handle) { + WARN("No D3D11 texture %p.\n", texture); + return cpp_func(linux_side, eye, texture, bounds, flags); + } + texture_iface = texture->handle; if (SUCCEEDED(hr = texture_iface->lpVtbl->QueryInterface(texture_iface,