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