summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/svga/svga_pipe_sampler.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_sampler.c b/src/gallium/drivers/svga/svga_pipe_sampler.c
index ab84ed39602..60e2d44ace4 100644
--- a/src/gallium/drivers/svga/svga_pipe_sampler.c
+++ b/src/gallium/drivers/svga/svga_pipe_sampler.c
@@ -455,8 +455,8 @@ svga_set_sampler_views(struct pipe_context *pipe,
* for the conflicted surface view.
*/
for (i = 0; i < svga->curr.framebuffer.nr_cbufs; i++) {
- struct svga_surface *s = svga_surface(svga->curr.framebuffer.cbufs[i]);
- if (s) {
+ if (svga->curr.framebuffer.cbufs[i]) {
+ struct svga_surface *s = svga_surface(svga->curr.framebuffer.cbufs[i]);
if (svga_check_sampler_view_resource_collision(svga, s->handle, shader)) {
svga->dirty |= SVGA_NEW_FRAME_BUFFER;
break;