move if{} block into another if{} block to avoid null deref

SVN revision: 55715
This commit is contained in:
Mike Blumenkrantz 2010-12-22 23:05:47 +00:00
parent 633de9d48d
commit ecf3a65a09
1 changed files with 16 additions and 16 deletions

View File

@ -1075,26 +1075,26 @@ _e_zone_useful_geometry_calc(E_Zone *zone)
if (shelf->cfg->autohide)
continue;
orient = shelf->cfg->orient;
if (shelf->cfg->desk_show_mode)
{
skip_shelf = 1;
EINA_LIST_FOREACH(shelf->cfg->desk_list, ll, sd)
{
if (!sd) continue;
if ((sd->x == zone->desk_x_current) && (sd->y == zone->desk_y_current))
{
skip_shelf = 0;
break;
}
}
if (skip_shelf)
continue;
}
}
else
orient = shelf->gadcon->orient;
if (shelf->cfg->desk_show_mode)
{
skip_shelf = 1;
EINA_LIST_FOREACH(shelf->cfg->desk_list, ll, sd)
{
if (!sd) continue;
if ((sd->x == zone->desk_x_current) && (sd->y == zone->desk_y_current))
{
skip_shelf = 0;
break;
}
}
if (skip_shelf)
continue;
}
switch (orient)
{
/* these are non-edje orientations */