summaryrefslogtreecommitdiff
path: root/tools/gfx-unit-test/gfx-test-util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gfx-unit-test/gfx-test-util.cpp')
-rw-r--r--tools/gfx-unit-test/gfx-test-util.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/gfx-unit-test/gfx-test-util.cpp b/tools/gfx-unit-test/gfx-test-util.cpp
index bd1b2a891..688bf048e 100644
--- a/tools/gfx-unit-test/gfx-test-util.cpp
+++ b/tools/gfx-unit-test/gfx-test-util.cpp
@@ -69,6 +69,8 @@ Slang::Result loadComputeProgram(
programDesc.slangGlobalScope = composedProgram.get();
auto shaderProgram = device->createProgram(programDesc);
+ if (!shaderProgram)
+ return SLANG_FAIL;
outShaderProgram = shaderProgram;
return SLANG_OK;