summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/freedreno/freedreno_resource.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index 95f79df565e..20495779d50 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -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;
}
}