raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=47f26b5b088c7c5be7e77e33e8b03e82b5e78b3c

commit 47f26b5b088c7c5be7e77e33e8b03e82b5e78b3c
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Mon Dec 7 19:39:01 2015 +0900

    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 89552e3..c90e2ef 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))

-- 


Reply via email to