summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2013-12-15 17:03:38 -0500
committerMike Blumenkrantz <zmike@samsung.com>2013-12-15 17:03:38 -0500
commitc7a23ab5bd72393c8e67f1dcb982ca4715466aa0 (patch)
tree16f81a8c9ca61ce6d47799431f042d144a7cbf64 /src
parent64b8da15a41b89eed9b69fbed71da66e9cd110d1 (diff)
don't crash when pulse exec deletes itself during startup timer
Diffstat (limited to 'src')
-rw-r--r--src/modules/mixer/sys_pulse.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/mixer/sys_pulse.c b/src/modules/mixer/sys_pulse.c
index 73a2bef98..12c4e236c 100644
--- a/src/modules/mixer/sys_pulse.c
+++ b/src/modules/mixer/sys_pulse.c
@@ -3,6 +3,7 @@
3#include "Pulse.h" 3#include "Pulse.h"
4 4
5static E_Exec_Instance *pulse_inst = NULL; 5static E_Exec_Instance *pulse_inst = NULL;
6static Eina_Bool pa_started = EINA_FALSE;
6 7
7static Pulse *conn = NULL; 8static Pulse *conn = NULL;
8static Pulse_Server_Info *info = NULL; 9static Pulse_Server_Info *info = NULL;
@@ -33,6 +34,8 @@ _pulse_started(void *data EINA_UNUSED, int type EINA_UNUSED, E_Exec_Instance *in
33 if (inst != pulse_inst) return ECORE_CALLBACK_RENEW; 34 if (inst != pulse_inst) return ECORE_CALLBACK_RENEW;
34 if (!update_timer) 35 if (!update_timer)
35 update_timer = ecore_timer_add(2.0, _pulse_start, NULL); 36 update_timer = ecore_timer_add(2.0, _pulse_start, NULL);
37 pa_started = EINA_TRUE;
38 pulse_inst = NULL;
36 return ECORE_CALLBACK_DONE; 39 return ECORE_CALLBACK_DONE;
37} 40}
38 41
@@ -300,10 +303,8 @@ e_mixer_pulse_init(void)
300 conn = NULL; 303 conn = NULL;
301 pulse_shutdown(); 304 pulse_shutdown();
302 305
303 if (pulse_inst) 306 if (pa_started)
304 { 307 {
305 ecore_exe_free(pulse_inst->exe);
306 pulse_inst = NULL;
307 e_mod_mixer_pulse_ready(EINA_FALSE); 308 e_mod_mixer_pulse_ready(EINA_FALSE);
308 return EINA_FALSE; 309 return EINA_FALSE;
309 } 310 }