[gtk/gtk-3-24: 5/20] Don't attempt to dereference icon_theme until after checking it.



commit cf279a14fa454572b43f7e2284712d277dd725bb
Author: John Ralls <jralls ceridwen us>
Date:   Mon Dec 3 21:14:25 2018 +0900

    Don't attempt to dereference icon_theme until after checking it.

 gtk/gtkicontheme.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index bc273ce59c..43c3897ded 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -1031,11 +1031,12 @@ void
 gtk_icon_theme_add_resource_path (GtkIconTheme *icon_theme,
                                   const gchar  *path)
 {
-  GtkIconThemePrivate *priv = icon_theme->priv;
+  GtkIconThemePrivate *priv = NULL;
 
   g_return_if_fail (GTK_IS_ICON_THEME (icon_theme));
   g_return_if_fail (path != NULL);
 
+  priv = icon_theme->priv;
   priv->resource_paths = g_list_append (priv->resource_paths, g_strdup (path));
 
   do_theme_change (icon_theme);


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