radv: fix a crash in radv_can_dump_shader()

module can be NULL, oops.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
Samuel Pitoiset 2017-12-04 15:32:58 +01:00
parent a932aee7a8
commit 5de7c782fb

View File

@ -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