aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_fbo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_cb_fbo.h')
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.h b/src/mesa/state_tracker/st_cb_fbo.h
index d3e05547729..351fb9a02ef 100644
--- a/src/mesa/state_tracker/st_cb_fbo.h
+++ b/src/mesa/state_tracker/st_cb_fbo.h
@@ -85,7 +85,8 @@ static inline struct st_framebuffer *
st_ws_framebuffer(struct gl_framebuffer *fb)
{
/* FBO cannot be casted. See st_new_framebuffer */
- if (fb && _mesa_is_winsys_fbo(fb))
+ if (fb && _mesa_is_winsys_fbo(fb) &&
+ fb != _mesa_get_incomplete_framebuffer())
return (struct st_framebuffer *) fb;
return NULL;
}