summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/transformfeedback.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c
index 976b2686a60..f73a89f6c0f 100644
--- a/src/mesa/main/transformfeedback.c
+++ b/src/mesa/main/transformfeedback.c
@@ -1136,6 +1136,11 @@ _mesa_DeleteTransformFeedbacks(GLsizei n, const GLuint *names)
}
_mesa_HashRemove(ctx->TransformFeedback.Objects, names[i]);
/* unref, but object may not be deleted until later */
+ if (obj == ctx->TransformFeedback.CurrentObject) {
+ reference_transform_feedback_object(
+ &ctx->TransformFeedback.CurrentObject,
+ ctx->TransformFeedback.DefaultObject);
+ }
reference_transform_feedback_object(&obj, NULL);
}
}