[Xfce4-commits] <exo:master> Protect against null value (bug #9418).
Nick Schermer
noreply at xfce.org
Mon Oct 29 22:16:01 CET 2012
Updating branch refs/heads/master
to a938081a7a0f370744b7acc2e3df3cebb0f37e91 (commit)
from 4d5d50e7e62ea929861578e737793c4866cfdcf3 (commit)
commit a938081a7a0f370744b7acc2e3df3cebb0f37e91
Author: Nick Schermer <nick at xfce.org>
Date: Mon Oct 29 22:13:22 2012 +0100
Protect against null value (bug #9418).
exo/exo-icon-view.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/exo/exo-icon-view.c b/exo/exo-icon-view.c
index 41792b9..050b8be 100644
--- a/exo/exo-icon-view.c
+++ b/exo/exo-icon-view.c
@@ -2704,20 +2704,22 @@ exo_icon_view_item_hit_test (ExoIconView *icon_view,
gint width,
gint height)
{
- GList *l;
- GdkRectangle box;
+ GList *l;
+ GdkRectangle box;
+ ExoIconViewCellInfo *info;
for (l = icon_view->priv->cell_list; l; l = l->next)
{
- ExoIconViewCellInfo *info = (ExoIconViewCellInfo *)l->data;
+ info = l->data;
- if (!info->cell->visible)
+ if (!info->cell->visible
+ || item->box == NULL)
continue;
box = item->box[info->position];
- if (MIN (x + width, box.x + box.width) - MAX (x, box.x) > 0 &&
- MIN (y + height, box.y + box.height) - MAX (y, box.y) > 0)
+ if (MIN (x + width, box.x + box.width) - MAX (x, box.x) > 0
+ && MIN (y + height, box.y + box.height) - MAX (y, box.y) > 0)
return TRUE;
}
More information about the Xfce4-commits
mailing list