diff options
| author | Michael Biebl <biebl@debian.org> | 2013-02-20 23:06:45 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2013-02-20 23:06:45 +0100 |
| commit | 8d275584fc94f398f0a7c990dcd057533d9a5856 (patch) | |
| tree | 1bf4a928e201222a008e6776799d174ee3223be3 /src/settings/nm-settings.c | |
| parent | e17c5736fc3722ce51cb33f3edb203960125a4c1 (diff) | |
Imported Upstream version 0.9.8.0 upstream/0.9.8.0
Diffstat (limited to 'src/settings/nm-settings.c')
| -rw-r--r-- | src/settings/nm-settings.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c index fa474e09..2cfda091 100644 --- a/src/settings/nm-settings.c +++ b/src/settings/nm-settings.c @@ -587,7 +587,7 @@ load_plugins (NMSettings *self, const char **plugins, GError **error) gboolean keyfile_added = FALSE; gboolean success = TRUE; - for (iter = plugins; *iter; iter++) { + for (iter = plugins; iter && *iter; iter++) { GModule *plugin; char *full_name, *path; const char *pname = *iter; @@ -1768,12 +1768,10 @@ nm_settings_new (const char *config_file, priv->dbus_mgr = nm_dbus_manager_get (); priv->bus = nm_dbus_manager_get_connection (priv->dbus_mgr); - if (plugins) { - /* Load the plugins; fail if a plugin is not found. */ - if (!load_plugins (self, plugins, error)) { - g_object_unref (self); - return NULL; - } + /* Load the plugins; fail if a plugin is not found. */ + if (!load_plugins (self, plugins, error)) { + g_object_unref (self); + return NULL; } unmanaged_specs_changed (NULL, self); |