enlightenment: Make sure we have a zone before calling

_bgpreview_viewport_update

@fix CID1324753

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-10-14 10:59:31 -04:00
parent 2cd6fcc3a9
commit d74273f732
1 changed files with 3 additions and 1 deletions

View File

@ -324,11 +324,13 @@ _e_wid_cb_bg_update(void *data, int type, void *event)
((ev->desk_x < 0) || (dd->x == ev->desk_x)) &&
((ev->desk_y < 0) || (dd->y == ev->desk_y)))
{
E_Zone *zone;
const char *bgfile;
zone = e_comp_zone_number_get(dd->zone);
bgfile = e_bg_file_get(dd->zone, dd->x, dd->y);
edje_object_file_set(dd->thumb, bgfile, "e/desktop/background");
_bgpreview_viewport_update(dd->thumb, e_comp_zone_number_get(dd->zone), dd->x, dd->y);
if (zone) _bgpreview_viewport_update(dd->thumb, zone, dd->x, dd->y);
eina_stringshare_del(bgfile);
}