summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-12-04 15:32:58 +0100
committerSamuel Pitoiset <[email protected]>2017-12-04 19:52:14 +0100
commit5de7c782fbb30dc49d6b48f797db8f551dada50a (patch)
treeb1fb5a4b0776fa1ffe00615841f5f01ea5c9841b
parenta932aee7a8f1e13a1885823c808dcc7b72e761ae (diff)
radv: fix a crash in radv_can_dump_shader()
module can be NULL, oops. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
-rw-r--r--src/amd/vulkan/radv_shader.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h
index 91f2e7f2a12..f6486863f88 100644
--- a/src/amd/vulkan/radv_shader.h
+++ b/src/amd/vulkan/radv_shader.h
@@ -118,8 +118,8 @@ radv_can_dump_shader(struct radv_device *device,
struct radv_shader_module *module)
{
/* Only dump non-meta shaders, useful for debugging purposes. */
- return !module->nir &&
- device->instance->debug_flags & RADV_DEBUG_DUMP_SHADERS;
+ return device->instance->debug_flags & RADV_DEBUG_DUMP_SHADERS &&
+ module && !module->nir;
}
#endif