summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_feedback.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_cb_feedback.c')
-rw-r--r--src/mesa/state_tracker/st_cb_feedback.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_feedback.c b/src/mesa/state_tracker/st_cb_feedback.c
index 735e268be87..a18f4f76bcf 100644
--- a/src/mesa/state_tracker/st_cb_feedback.c
+++ b/src/mesa/state_tracker/st_cb_feedback.c
@@ -274,7 +274,10 @@ static void
st_RenderMode(struct gl_context *ctx, GLenum newMode )
{
struct st_context *st = st_context(ctx);
- struct draw_context *draw = st->draw;
+ struct draw_context *draw = st_get_draw_context(st);
+
+ if (!st->draw)
+ return;
if (newMode == GL_RENDER) {
/* restore normal VBO draw function */