summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen 'Okra' Houston <smhouston88@gmail.com>2017-01-27 18:16:32 -0600
committerStephen 'Okra' Houston <smhouston88@gmail.com>2017-01-27 18:16:32 -0600
commitd55164d0e06d2e8a1ad57a78940cb6504c818b05 (patch)
tree40af40dc8e9745bc02da7409d2a396227d54e626
parentd99e88b78c2fd7ce820d93632bb638e7a48fc167 (diff)
downloadenlightenment-d55164d0e06d2e8a1ad57a78940cb6504c818b05.tar.gz
Enlightenment - Sysinfo Gadget - Add some safety fallbacks for thermal - Fixes a dnd crash.
-rw-r--r--src/modules/sysinfo/thermal/thermal.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/sysinfo/thermal/thermal.c b/src/modules/sysinfo/thermal/thermal.c
index 16cc2dc490..a0f3dec96b 100644
--- a/src/modules/sysinfo/thermal/thermal.c
+++ b/src/modules/sysinfo/thermal/thermal.c
@@ -5,6 +5,8 @@ _thermal_thread_free(Tempthread *tth)
{
const char *s;
+ if (!tth) return;
+
eina_stringshare_del(tth->sensor_name);
eina_stringshare_del(tth->sensor_path);
#ifdef HAVE_EEZE
@@ -176,7 +178,7 @@ _thermal_face_shutdown(Instance *inst)
#ifdef HAVE_EEZE
if (inst->cfg->thermal.poller)
{
- ecore_poller_del(inst->cfg->thermal.poller);
+ E_FREE_FUNC(inst->cfg->thermal.poller, ecore_poller_del);
_thermal_thread_free(inst->cfg->thermal.tth);
}
#endif