Module: Mesa Branch: master Commit: 5de7c782fbb30dc49d6b48f797db8f551dada50a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5de7c782fbb30dc49d6b48f797db8f551dada50a
Author: Samuel Pitoiset <[email protected]> Date: Mon Dec 4 15:32:58 2017 +0100 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]> --- src/amd/vulkan/radv_shader.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h index 91f2e7f2a1..f6486863f8 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 _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
