[network-manager-applet] wifi: don't assert when priv->connection is NULL



commit d2f35d45c15a441a27bbc2d7cd3e484e88430174
Author: JiÅÃ KlimeÅ <jklimes redhat com>
Date:   Tue Feb 14 17:30:14 2012 +0100

    wifi: don't assert when priv->connection is NULL
    
    The following message was printed
    ** CRITICAL **: nm_connection_need_secrets: assertion `connection != NULL' failed

 src/libnm-gtk/nm-wireless-dialog.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/libnm-gtk/nm-wireless-dialog.c b/src/libnm-gtk/nm-wireless-dialog.c
index 0d79f75..ec04a83 100644
--- a/src/libnm-gtk/nm-wireless-dialog.c
+++ b/src/libnm-gtk/nm-wireless-dialog.c
@@ -1002,7 +1002,7 @@ security_combo_init (NMAWirelessDialog *self, gboolean secrets_only)
 	 * will already be populated with secrets.  If no connection was given,
 	 * then we need to get any existing secrets to populate the dialog with.
 	 */
-	setting_name = nm_connection_need_secrets (priv->connection, NULL);
+	setting_name = priv->connection ? nm_connection_need_secrets (priv->connection, NULL) : NULL;
 	if (setting_name && NM_IS_REMOTE_CONNECTION (priv->connection)) {
 		GetSecretsInfo *info;
 



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