diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-08-03 16:42:41 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-08-03 16:42:41 +0200 |
commit | 1ae1dfcc1062d08360c8253e885993d2a693d81c (patch) | |
tree | 29f093319d5807949c1696bbc20630be76dcab5e /src | |
parent | 0a2fced2ee54917819a5cbbfd631419c7540965b (diff) |
simplify a bit
Diffstat (limited to 'src')
-rw-r--r-- | src/pulsecore/x11wrap.c | 6 |
1 files changed, 4 insertions, 2 deletions
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) { |