summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_framebuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/util/u_framebuffer.c')
-rw-r--r--src/gallium/auxiliary/util/u_framebuffer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_framebuffer.c b/src/gallium/auxiliary/util/u_framebuffer.c
index 377b802b62a..2e0ef749e82 100644
--- a/src/gallium/auxiliary/util/u_framebuffer.c
+++ b/src/gallium/auxiliary/util/u_framebuffer.c
@@ -127,6 +127,9 @@ util_framebuffer_min_size(const struct pipe_framebuffer_state *fb,
unsigned i;
for (i = 0; i < fb->nr_cbufs; i++) {
+ if (!fb->cbufs[i])
+ continue;
+
w = MIN2(w, fb->cbufs[i]->width);
h = MIN2(h, fb->cbufs[i]->height);
}