[gtk+] grid: Add missing guard to gtk_grid_get_child_at()
- From: Bastian Winkler <bwinkler src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] grid: Add missing guard to gtk_grid_get_child_at()
- Date: Sun, 3 Jun 2012 00:15:12 +0000 (UTC)
commit 4fee1aa22b44d1113a430e8f07159730f20be98a
Author: Bastian Winkler <buz netbuz org>
Date: Sun Jun 3 01:40:41 2012 +0200
grid: Add missing guard to gtk_grid_get_child_at()
Add missing guard to make sure it's called with a GtkGrid argument.
https://bugzilla.gnome.org/show_bug.cgi?id=677363
gtk/gtkgrid.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c
index f8a281e..cbc3c34 100644
--- a/gtk/gtkgrid.c
+++ b/gtk/gtkgrid.c
@@ -1603,10 +1603,14 @@ gtk_grid_get_child_at (GtkGrid *grid,
gint left,
gint top)
{
- GtkGridPrivate *priv = grid->priv;
+ GtkGridPrivate *priv;
GtkGridChild *child;
GList *list;
+ g_return_val_if_fail (GTK_IS_GRID (grid), NULL);
+
+ priv = grid->priv;
+
for (list = priv->children; list; list = list->next)
{
child = list->data;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]