diff options
| author | Michael Biebl <biebl@debian.org> | 2015-07-14 19:38:58 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2015-07-14 19:38:58 +0200 |
| commit | 50a58f0fabd8a34c1b6108a107e08abe3c1ccd24 (patch) | |
| tree | 6790165f39daee79e2b6c6617483320613493367 /libnm-core/nm-setting.c | |
| parent | f408e27bccfacf347605a8d98649975a68f38a17 (diff) | |
Imported Upstream version 1.0.4 upstream/1.0.4
Diffstat (limited to 'libnm-core/nm-setting.c')
| -rw-r--r-- | libnm-core/nm-setting.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/libnm-core/nm-setting.c b/libnm-core/nm-setting.c index b78d9376..e1e81b5d 100644 --- a/libnm-core/nm-setting.c +++ b/libnm-core/nm-setting.c @@ -91,7 +91,7 @@ _nm_gtype_hash (gconstpointer v) return *((const GType *) v); } -static void __attribute__((constructor)) +static void _ensure_registered (void) { if (G_UNLIKELY (registered_settings == NULL)) { @@ -103,6 +103,12 @@ _ensure_registered (void) } } +static void __attribute__((constructor)) +_ensure_registered_constructor (void) +{ + _ensure_registered (); +} + #define _ensure_setting_info(self, priv) \ G_STMT_START { \ NMSettingPrivate *_priv_esi = (priv); \ @@ -1047,13 +1053,15 @@ compare_property (NMSetting *setting, property = nm_setting_class_find_property (NM_SETTING_GET_CLASS (setting), prop_spec->name); g_return_val_if_fail (property != NULL, FALSE); - value1 = get_property_for_dbus (setting, property, FALSE); - value2 = get_property_for_dbus (other, property, FALSE); + value1 = get_property_for_dbus (setting, property, TRUE); + value2 = get_property_for_dbus (other, property, TRUE); cmp = nm_property_compare (value1, value2); - g_variant_unref (value1); - g_variant_unref (value2); + if (value1) + g_variant_unref (value1); + if (value2) + g_variant_unref (value2); return cmp == 0; } |