summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulsecore/object.c')
-rw-r--r--src/pulsecore/object.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pulsecore/object.c b/src/pulsecore/object.c
index a4bb14f1..f3ead9c5 100644
--- a/src/pulsecore/object.c
+++ b/src/pulsecore/object.c
@@ -59,10 +59,9 @@ pa_object *pa_object_ref(pa_object *o) {
void pa_object_unref(pa_object *o) {
pa_object_assert_ref(o);
- if (PA_REFCNT_VALUE(o) == 1) {
+ if (PA_REFCNT_DEC(o) <= 0) {
pa_assert(o->free);
o->free(o);
- pa_assert_se(PA_REFCNT_DEC(o) == 0);
}
}