[gtk+/gtk-3-22] Fixed: Don’t dereference before typechecking



commit 567ef528e55bb56be9f10b41f6bae72c30ec5ba8
Author: Daniel Boles <dboles src gnome org>
Date:   Fri Oct 13 09:49:34 2017 +0100

    Fixed: Don’t dereference before typechecking

 gtk/gtkfixed.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkfixed.c b/gtk/gtkfixed.c
index 3ed54b8..4fa237e 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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]