From 2b452e5db1360522ab8039a559fc3dd89483f67e Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Wed, 22 Apr 2020 20:46:59 +0100 Subject: [PATCH] e - avoid segv's when zero screens are configured at least backlight won't be applied now... --- src/bin/e_backlight.c | 1 + src/bin/e_randr2.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/bin/e_backlight.c b/src/bin/e_backlight.c index 1ea9bf0ac..dbc6ad929 100644 --- a/src/bin/e_backlight.c +++ b/src/bin/e_backlight.c @@ -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; diff --git a/src/bin/e_randr2.c b/src/bin/e_randr2.c index 44072c95e..9a0885122 100644 --- a/src/bin/e_randr2.c +++ b/src/bin/e_randr2.c @@ -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;