mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-23 23:41:13 +00:00
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:
parent
a932aee7a8
commit
5de7c782fb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user