mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
st/mesa: check renderbuffer before using it
rb being NULL is only checked for in the caller if no-error isn't used. cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9747 Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25209>
This commit is contained in:
parent
af27ecb089
commit
63a3a9b23b
1 changed files with 3 additions and 0 deletions
|
|
@ -427,6 +427,9 @@ st_ReadPixels(struct gl_context *ctx, GLint x, GLint y,
|
||||||
uint8_t *map = NULL;
|
uint8_t *map = NULL;
|
||||||
int dst_x, dst_y;
|
int dst_x, dst_y;
|
||||||
|
|
||||||
|
if (rb == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
/* Validate state (to be sure we have up-to-date framebuffer surfaces)
|
/* Validate state (to be sure we have up-to-date framebuffer surfaces)
|
||||||
* and flush the bitmap cache prior to reading. */
|
* and flush the bitmap cache prior to reading. */
|
||||||
st_validate_state(st, ST_PIPELINE_UPDATE_FB_STATE_MASK);
|
st_validate_state(st, ST_PIPELINE_UPDATE_FB_STATE_MASK);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue