zink: add missing null check
mismerged from an earlier patch... Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9623>
This commit is contained in:
parent
5ff99387a1
commit
3aa2da96df
|
@ -63,7 +63,7 @@ get_resource_for_descriptor(struct zink_context *ctx, enum zink_descriptor_type
|
|||
case ZINK_DESCRIPTOR_TYPE_SSBO:
|
||||
return zink_resource(ctx->ssbos[shader][idx].buffer);
|
||||
case ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW:
|
||||
return zink_resource(ctx->sampler_views[shader][idx]->texture);
|
||||
return ctx->sampler_views[shader][idx] ? zink_resource(ctx->sampler_views[shader][idx]->texture) : NULL;
|
||||
case ZINK_DESCRIPTOR_TYPE_IMAGE:
|
||||
return zink_resource(ctx->image_views[shader][idx].base.resource);
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue