summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/pipelineobj.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/pipelineobj.c')
-rw-r--r--src/mesa/main/pipelineobj.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c
index c1dd8d75c76..2988c97455e 100644
--- a/src/mesa/main/pipelineobj.c
+++ b/src/mesa/main/pipelineobj.c
@@ -206,16 +206,10 @@ _mesa_reference_pipeline_object_(struct gl_context *ctx,
if (obj) {
/* reference new pipeline object */
mtx_lock(&obj->Mutex);
- if (obj->RefCount == 0) {
- /* this pipeline's being deleted (look just above) */
- /* Not sure this can ever really happen. Warn if it does. */
- _mesa_problem(NULL, "referencing deleted pipeline object");
- *ptr = NULL;
- }
- else {
- obj->RefCount++;
- *ptr = obj;
- }
+ assert(obj->RefCount > 0);
+
+ obj->RefCount++;
+ *ptr = obj;
mtx_unlock(&obj->Mutex);
}
}