From 1ae1dfcc1062d08360c8253e885993d2a693d81c Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 3 Aug 2008 16:42:41 +0200 Subject: simplify a bit --- src/pulsecore/x11wrap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/pulsecore') diff --git a/src/pulsecore/x11wrap.c b/src/pulsecore/x11wrap.c index 353b120b..17f8e6a4 100644 --- a/src/pulsecore/x11wrap.c +++ b/src/pulsecore/x11wrap.c @@ -243,8 +243,10 @@ void pa_x11_wrapper_unref(pa_x11_wrapper* w) { pa_assert(w); pa_assert(PA_REFCNT_VALUE(w) >= 1); - if (PA_REFCNT_DEC(w) <= 0) - x11_wrapper_free(w); + if (PA_REFCNT_DEC(w) > 0) + return; + + x11_wrapper_free(w); } Display *pa_x11_wrapper_get_display(pa_x11_wrapper *w) { -- cgit