From c7a23ab5bd72393c8e67f1dcb982ca4715466aa0 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Sun, 15 Dec 2013 17:03:38 -0500 Subject: [PATCH] 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 73a2bef98..12c4e236c 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; }