From 06ed52712367d9be2c0d9316211a70325f6623ee Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Thu, 11 Oct 2018 12:42:38 +0100 Subject: [PATCH] bryce - dont segv when unplugging a screen --- src/bin/e_bryce.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/bin/e_bryce.c b/src/bin/e_bryce.c index 5db693840..6a19e2a4b 100644 --- a/src/bin/e_bryce.c +++ b/src/bin/e_bryce.c @@ -234,11 +234,15 @@ _bryce_autosize(Bryce *b) E_Zone *zone; zone = e_comp_zone_number_get(b->zone); - maxw = zone->w; - if (b->orient == E_GADGET_SITE_ORIENT_VERTICAL) - e_zone_useful_geometry_get(e_comp_zone_number_get(b->zone), NULL, NULL, NULL, &maxh); - else - maxh = zone->h; + if (zone) + { + maxw = zone->w; + if (b->orient == E_GADGET_SITE_ORIENT_VERTICAL) + e_zone_useful_geometry_get(e_comp_zone_number_get(b->zone), NULL, NULL, NULL, &maxh); + else + maxh = zone->h; + } + else return; } else evas_object_geometry_get(b->parent, NULL, NULL, &maxw, &maxh);