[pulseaudio-commits] r2320 - /branches/glitch-free/src/pulse/subscribe.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Thu May 1 12:15:09 PDT 2008


Author: lennart
Date: Thu May  1 21:15:08 2008
New Revision: 2320

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2320&root=pulseaudio&view=rev
Log:
don't allow overwriting of callback pointers when we're already dead

Modified:
    branches/glitch-free/src/pulse/subscribe.c

Modified: branches/glitch-free/src/pulse/subscribe.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/pulse/subscribe.c?rev=2320&root=pulseaudio&r1=2319&r2=2320&view=diff
==============================================================================
--- branches/glitch-free/src/pulse/subscribe.c (original)
+++ branches/glitch-free/src/pulse/subscribe.c Thu May  1 21:15:08 2008
@@ -88,6 +88,9 @@
     pa_assert(c);
     pa_assert(PA_REFCNT_VALUE(c) >= 1);
 
+    if (c->state == PA_CONTEXT_TERMINATED || c->state == PA_CONTEXT_FAILED)
+        return;
+
     c->subscribe_callback = cb;
     c->subscribe_userdata = userdata;
 }




More information about the pulseaudio-commits mailing list