[network-manager-applet] libnm-gtk: fix warning when initializing the connection combo the first time



commit 87437cb2e0b3ed24dc83b2916398145a0af85299
Author: Dan Williams <dcbw redhat com>
Date:   Fri Sep 21 16:22:14 2012 -0500

    libnm-gtk: fix warning when initializing the connection combo the first time
    
    priv->connection_model will be NULL...

 src/libnm-gtk/nm-wifi-dialog.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/libnm-gtk/nm-wifi-dialog.c b/src/libnm-gtk/nm-wifi-dialog.c
index 58373d7..bfebacb 100644
--- a/src/libnm-gtk/nm-wifi-dialog.c
+++ b/src/libnm-gtk/nm-wifi-dialog.c
@@ -408,7 +408,8 @@ connection_combo_init (NMAWifiDialog *self, NMConnection *connection)
 	g_return_val_if_fail (priv->connection == NULL, FALSE);
 
 	/* Clear any old model */
-	g_object_unref (priv->connection_model);
+	if (priv->connection_model)
+		g_object_unref (priv->connection_model);
 
 	/* New model */
 	store = gtk_list_store_new (4, G_TYPE_STRING, G_TYPE_OBJECT, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN);



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