diff options
Diffstat (limited to 'src/mesa/main/arrayobj.c')
-rw-r--r-- | src/mesa/main/arrayobj.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index ab1b834b6d9..fdb3caad954 100644 --- a/src/mesa/main/arrayobj.c +++ b/src/mesa/main/arrayobj.c @@ -208,16 +208,10 @@ _mesa_reference_vao_(struct gl_context *ctx, if (vao) { /* reference new array object */ mtx_lock(&vao->Mutex); - if (vao->RefCount == 0) { - /* this array's being deleted (look just above) */ - /* Not sure this can every really happen. Warn if it does. */ - _mesa_problem(NULL, "referencing deleted array object"); - *ptr = NULL; - } - else { - vao->RefCount++; - *ptr = vao; - } + assert(vao->RefCount > 0); + + vao->RefCount++; + *ptr = vao; mtx_unlock(&vao->Mutex); } } |