vrclient: Handle NULL texture argument to IVRRenderModels::LoadIntoTextureD3D11_Async

This commit is contained in:
Andrew Eikum 2019-12-31 13:57:53 -06:00
parent 115b422c8f
commit f35f663a1b
2 changed files with 4 additions and 0 deletions

View File

@ -298,6 +298,7 @@ typedef enum EVRRenderModelError
VRRenderModelError_None = 0,
VRRenderModelError_Loading = 100,
VRRenderModelError_NotSupported = 200,
VRRenderModelError_InvalidArg = 300,
VRRenderModelError_InvalidTexture = 400,
} EVRRenderModelError;

View File

@ -1215,6 +1215,9 @@ EVRRenderModelError ivrrendermodels_load_into_texture_d3d11_async(
EVRRenderModelError error;
ID3D11Texture2D *texture;
if (!dst_texture)
return VRRenderModelError_InvalidArg;
error = load_linux_texture_map(linux_side, texture_id, &texture_map, version);
if (error == VRRenderModelError_Loading)
{