system-controller: fix a screen management crash.
authorIsmo Puustinen <ismo.puustinen@intel.com>
Fri, 7 Mar 2014 14:14:39 +0000 (16:14 +0200)
committerKrisztian Litkey <krisztian.litkey@intel.com>
Thu, 8 Jan 2015 16:37:14 +0000 (18:37 +0200)
Change-Id: I34c9ca4ea02860811bd039d0c3a43b53a88adf02

src/plugins/system-controller/resource-manager/screen.c

index 22d37e1..818df0b 100644 (file)
@@ -805,7 +805,9 @@ void mrp_screen_resource_lower(mrp_resmgr_screen_t *screen,
         zmin = MRP_ZONE_MAX-1;
 
         for (i = cnt = 0;  i < screen->narea;  i++) {
-            area = screen->areas[i];
+            if (!(area = screen->areas[i]))
+                continue;
+
             resources = &area->resources;
 
             mrp_list_foreach_back(resources, entry, n) {