a (not so) paranoid check

SVN revision: 13025
This commit is contained in:
handyande 2005-01-20 10:42:09 +00:00 committed by handyande
parent 674a9f4b4f
commit 1c5b65ca4d
2 changed files with 12 additions and 2 deletions

View File

@ -132,6 +132,9 @@ e_desk_at_xy_get(E_Zone *zone, int x, int y)
{
E_OBJECT_CHECK_RETURN(zone, NULL);
if (x >= zone->desk_x_count || y >= zone->desk_y_count)
return NULL;
return (E_Desk *) zone->desks[x + (y * zone->desk_x_count)];
}

View File

@ -714,8 +714,15 @@ _pager_cb_up(void *data, Evas *e, Evas_Object *obj, void *event_info)
if (left <= p->xx && p->xx < right && top <= p->yy && p->yy < bottom)
{
desk = e_desk_at_xy_get(zone, x, y);
e_desk_show(desk);
_pager_desk_set(p, desk);
if (desk)
{
e_desk_show(desk);
_pager_desk_set(p, desk);
}
else
{
printf("PAGER ERROR - %d, %d seems to be out of bounds\n", x, y);
}
}
}
}