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
This commit is contained in:
parent
027b044297
commit
47f26b5b08
|
@ -210,6 +210,7 @@ _e_backlight_update(void)
|
||||||
Ecore_X_Randr_Output *out;
|
Ecore_X_Randr_Output *out;
|
||||||
int i, num = 0;
|
int i, num = 0;
|
||||||
|
|
||||||
|
if (!e_comp) return;
|
||||||
root = e_comp->root;
|
root = e_comp->root;
|
||||||
// try randr
|
// try randr
|
||||||
if (root && xbl_avail)
|
if (root && xbl_avail)
|
||||||
|
@ -278,6 +279,7 @@ _e_backlight_set(double val)
|
||||||
int num = 0, i;
|
int num = 0, i;
|
||||||
char *name;
|
char *name;
|
||||||
|
|
||||||
|
if (!e_comp) return;
|
||||||
root = e_comp->root;
|
root = e_comp->root;
|
||||||
out = ecore_x_randr_window_outputs_get(root, &num);
|
out = ecore_x_randr_window_outputs_get(root, &num);
|
||||||
if ((out) && (num > 0))
|
if ((out) && (num > 0))
|
||||||
|
|
Loading…
Reference in New Issue