e - avoid segv's when zero screens are configured

at least backlight won't be applied now...
This commit is contained in:
Carsten Haitzler 2020-04-22 20:46:59 +01:00
parent d8130a741c
commit 2b452e5db1
2 changed files with 2 additions and 0 deletions

View File

@ -261,6 +261,7 @@ _backlight_devices_device_zone_get(Backlight_Device *bd)
snprintf(buf, sizeof(buf), "%s/%s", bd->output? bd->output: "", bd->edid ? bd->edid : "");
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
if (!zone->randr2_id) continue;
if (!strcmp(zone->randr2_id, buf)) return zone;
}
return NULL;

View File

@ -1493,6 +1493,7 @@ e_randr2_screen_id_find(const char *id)
Eina_List *l;
E_Randr2_Screen *s;
if (!id) return NULL;
EINA_LIST_FOREACH(e_randr2->screens, l, s)
{
if (!strcmp(id, s->id)) return s;