From 47f26b5b088c7c5be7e77e33e8b03e82b5e78b3c Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Mon, 7 Dec 2015 19:39:01 +0900 Subject: [PATCH] e backlight - avoid seg when comp is shut down and backlight updated if comp is already shut down, then backlight can't do shutdown things assuming comp is around, thus handle null e_comp. this fixes segv's waiting to happen as backlight is shut down after comp and thus e_comp is a garbage pointer of course @fix --- src/bin/e_backlight.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/e_backlight.c b/src/bin/e_backlight.c index 89552e3c9..c90e2ef06 100644 --- a/src/bin/e_backlight.c +++ b/src/bin/e_backlight.c @@ -210,6 +210,7 @@ _e_backlight_update(void) Ecore_X_Randr_Output *out; int i, num = 0; + if (!e_comp) return; root = e_comp->root; // try randr if (root && xbl_avail) @@ -278,6 +279,7 @@ _e_backlight_set(double val) int num = 0, i; char *name; + if (!e_comp) return; root = e_comp->root; out = ecore_x_randr_window_outputs_get(root, &num); if ((out) && (num > 0))