summaryrefslogtreecommitdiff
path: root/gtk/gtkfixed.c
diff options
context:
space:
mode:
authorDaniel Boles <dboles@src.gnome.org>2017-10-13 09:49:34 +0100
committerDaniel Boles <dboles@src.gnome.org>2017-10-13 09:50:19 +0100
commit9dde11bdea6a330ed582edb6e1fa050916684288 (patch)
tree941e54967bb38fc72bb0063f54af16f96bd174b3 /gtk/gtkfixed.c
parent3a91d36913362710cc295ae03822ea4bbb455c3c (diff)
downloadgtk+-9dde11bdea6a330ed582edb6e1fa050916684288.tar.gz
Fixed: Don’t dereference before typechecking
Diffstat (limited to 'gtk/gtkfixed.c')
-rw-r--r--gtk/gtkfixed.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtkfixed.c b/gtk/gtkfixed.c
index 62d6a2f3cc..bdb8e9570f 100644
--- a/gtk/gtkfixed.c
+++ b/gtk/gtkfixed.c
@@ -230,12 +230,14 @@ gtk_fixed_put (GtkFixed *fixed,
gint x,
gint y)
{
- GtkFixedPrivate *priv = fixed->priv;
+ GtkFixedPrivate *priv;
GtkFixedChild *child_info;
g_return_if_fail (GTK_IS_FIXED (fixed));
g_return_if_fail (GTK_IS_WIDGET (widget));
+ priv = fixed->priv;
+
child_info = g_new (GtkFixedChild, 1);
child_info->widget = widget;
child_info->x = x;