try avoid null ptr derefs.

SVN revision: 79168
This commit is contained in:
Carsten Haitzler 2012-11-12 14:45:59 +00:00
parent 12a2eacfb3
commit 3868f0f91a
2 changed files with 11 additions and 6 deletions

View File

@ -435,6 +435,7 @@ e_desk_at_xy_get(E_Zone *zone, int x, int y)
else if ((x < 0) || (y < 0))
return NULL;
if (!zone->desks) return NULL;
return zone->desks[x + (y * zone->desk_x_count)];
}

View File

@ -355,6 +355,8 @@ _pager_fill(Pager *p, E_Gadcon *gc)
E_Desk *desk;
desk = e_desk_at_xy_get(p->zone, x, y);
if (desk)
{
pd = _pager_desk_new(p, desk, x, y, p->invert);
if (pd)
{
@ -364,6 +366,7 @@ _pager_fill(Pager *p, E_Gadcon *gc)
}
}
}
}
e_table_thaw(p->o_table);
}
@ -412,6 +415,7 @@ _pager_desk_new(Pager *p, E_Desk *desk, int xpos, int ypos, Eina_Bool invert)
int w, h;
Evas *e;
if (!desk) return NULL;
pd = E_NEW(Pager_Desk, 1);
if (!pd) return NULL;