[gtk+] grid: Fix access to grid->priv member
- From: Bastian Winkler <bwinkler src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] grid: Fix access to grid->priv member
- Date: Sun, 3 Jun 2012 00:15:17 +0000 (UTC)
commit b0ea45863df9a89588cb99a27332a5f44178e861
Author: Bastian Winkler <buz netbuz org>
Date: Sun Jun 3 01:45:05 2012 +0200
grid: Fix access to grid->priv member
The priv member should be accessed after the g_return_if_fail test
https://bugzilla.gnome.org/show_bug.cgi?id=677363
gtk/gtkgrid.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c
index cbc3c34..571f826 100644
--- a/gtk/gtkgrid.c
+++ b/gtk/gtkgrid.c
@@ -1642,13 +1642,15 @@ void
gtk_grid_insert_row (GtkGrid *grid,
gint position)
{
- GtkGridPrivate *priv = grid->priv;
+ GtkGridPrivate *priv;
GtkGridChild *child;
GList *list;
gint top, height;
g_return_if_fail (GTK_IS_GRID (grid));
+ priv = grid->priv;
+
for (list = priv->children; list; list = list->next)
{
child = list->data;
@@ -1686,13 +1688,15 @@ void
gtk_grid_insert_column (GtkGrid *grid,
gint position)
{
- GtkGridPrivate *priv = grid->priv;
+ GtkGridPrivate *priv;
GtkGridChild *child;
GList *list;
gint left, width;
g_return_if_fail (GTK_IS_GRID (grid));
+ 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]