diff options
author | Mike Blumenkrantz <zmike@samsung.com> | 2013-12-15 17:03:38 -0500 |
---|---|---|
committer | Mike Blumenkrantz <zmike@samsung.com> | 2013-12-15 17:03:38 -0500 |
commit | c7a23ab5bd72393c8e67f1dcb982ca4715466aa0 (patch) | |
tree | 16f81a8c9ca61ce6d47799431f042d144a7cbf64 /src/modules | |
parent | 64b8da15a41b89eed9b69fbed71da66e9cd110d1 (diff) | |
download | enlightenment-c7a23ab5bd72393c8e67f1dcb982ca4715466aa0.tar.gz |
don't crash when pulse exec deletes itself during startup timer
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/mixer/sys_pulse.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/mixer/sys_pulse.c b/src/modules/mixer/sys_pulse.c index 73a2bef98a..12c4e236c5 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; } |