mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
freedreno: fix crash in fd_invalidate_resource()
Signed-off-by: Rob Clark <robclark@freedesktop.org>
This commit is contained in:
parent
ab3ba21f97
commit
422296e38d
1 changed files with 2 additions and 2 deletions
|
|
@ -72,11 +72,11 @@ fd_invalidate_resource(struct fd_context *ctx, struct pipe_resource *prsc)
|
|||
|
||||
/* Textures */
|
||||
for (i = 0; i < ctx->verttex.num_textures && !(ctx->dirty & FD_DIRTY_VERTTEX); i++) {
|
||||
if (ctx->verttex.textures[i]->texture == prsc)
|
||||
if (ctx->verttex.textures[i] && (ctx->verttex.textures[i]->texture == prsc))
|
||||
ctx->dirty |= FD_DIRTY_VERTTEX;
|
||||
}
|
||||
for (i = 0; i < ctx->fragtex.num_textures && !(ctx->dirty & FD_DIRTY_FRAGTEX); i++) {
|
||||
if (ctx->fragtex.textures[i]->texture == prsc)
|
||||
if (ctx->fragtex.textures[i] && (ctx->fragtex.textures[i]->texture == prsc))
|
||||
ctx->dirty |= FD_DIRTY_FRAGTEX;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue