From fcb725e296830359890dae2c401c7a55c7603a86 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 8 May 2008 00:55:21 +0000 Subject: [PATCH] Don't complain if system settings service exits before connections are read git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3641 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- system-settings/plugins/keyfile/plugin.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/system-settings/plugins/keyfile/plugin.c b/system-settings/plugins/keyfile/plugin.c index 32591cd0cd..5be931f73b 100644 --- a/system-settings/plugins/keyfile/plugin.c +++ b/system-settings/plugins/keyfile/plugin.c @@ -43,10 +43,11 @@ read_one_connection (NMSystemConfigInterface *config, const char *filename) NMKeyfileConnection *connection; connection = nm_keyfile_connection_new (filename); - if (connection) + if (connection) { g_hash_table_insert (priv->hash, (gpointer) nm_keyfile_connection_get_filename (connection), g_object_ref (connection)); + } return connection; } @@ -221,7 +222,8 @@ dispose (GObject *object) g_object_unref (priv->monitor); } - g_hash_table_destroy (priv->hash); + if (priv->hash) + g_hash_table_destroy (priv->hash); G_OBJECT_CLASS (sc_plugin_keyfile_parent_class)->dispose (object); }