diff --git a/.pick_status.json b/.pick_status.json index cc51ee37c1b..478fbbd2eaf 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2335,7 +2335,7 @@ "description": "gallium/dri2: Move image->texture assignment after image NULL check.", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "ad609bf55a87200ab11ad7cf31420dcfd8dfc141" }, diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c index da2a28725e8..8eff860015d 100644 --- a/src/gallium/frontends/dri/dri2.c +++ b/src/gallium/frontends/dri/dri2.c @@ -1533,7 +1533,6 @@ dri2_map_image(__DRIcontext *context, __DRIimage *image, struct dri_context *ctx = dri_context(context); struct pipe_context *pipe = ctx->st->pipe; enum pipe_transfer_usage pipe_access = 0; - struct pipe_resource *resource = image->texture; struct pipe_transfer *trans; void *map; @@ -1544,6 +1543,7 @@ dri2_map_image(__DRIcontext *context, __DRIimage *image, if (plane >= dri2_get_mapping_by_format(image->dri_format)->nplanes) return NULL; + struct pipe_resource *resource = image->texture; while (plane--) resource = resource->next;