discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=c7a23ab5bd72393c8e67f1dcb982ca4715466aa0

commit c7a23ab5bd72393c8e67f1dcb982ca4715466aa0
Author: Mike Blumenkrantz <[email protected]>
Date:   Sun Dec 15 17:03:38 2013 -0500

    don't crash when pulse exec deletes itself during startup timer
---
 src/modules/mixer/sys_pulse.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/modules/mixer/sys_pulse.c b/src/modules/mixer/sys_pulse.c
index 73a2bef..12c4e23 100644
--- a/src/modules/mixer/sys_pulse.c
+++ b/src/modules/mixer/sys_pulse.c
@@ -3,6 +3,7 @@
 #include "Pulse.h"
 
 static E_Exec_Instance *pulse_inst = NULL;
+static Eina_Bool pa_started = EINA_FALSE;
 
 static Pulse *conn = NULL;
 static Pulse_Server_Info *info = NULL;
@@ -33,6 +34,8 @@ _pulse_started(void *data EINA_UNUSED, int type EINA_UNUSED, 
E_Exec_Instance *in
    if (inst != pulse_inst) return ECORE_CALLBACK_RENEW;
    if (!update_timer)
      update_timer = ecore_timer_add(2.0, _pulse_start, NULL);
+   pa_started = EINA_TRUE;
+   pulse_inst = NULL;
    return ECORE_CALLBACK_DONE;
 }
 
@@ -300,10 +303,8 @@ e_mixer_pulse_init(void)
         conn = NULL;
         pulse_shutdown();
 
-        if (pulse_inst)
+        if (pa_started)
           {
-             ecore_exe_free(pulse_inst->exe);
-             pulse_inst = NULL;
              e_mod_mixer_pulse_ready(EINA_FALSE);
              return EINA_FALSE;
           }

-- 


Reply via email to