diff options
Diffstat (limited to 'libnm-core/nm-setting-adsl.c')
| -rw-r--r-- | libnm-core/nm-setting-adsl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libnm-core/nm-setting-adsl.c b/libnm-core/nm-setting-adsl.c index 2e71f8e7..7d78f060 100644 --- a/libnm-core/nm-setting-adsl.c +++ b/libnm-core/nm-setting-adsl.c @@ -267,6 +267,7 @@ set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { NMSettingAdslPrivate *priv = NM_SETTING_ADSL_GET_PRIVATE (object); + const char *str; switch (prop_id) { case PROP_USERNAME: @@ -282,11 +283,13 @@ set_property (GObject *object, guint prop_id, break; case PROP_PROTOCOL: g_free (priv->protocol); - priv->protocol = g_ascii_strdown (g_value_get_string (value), -1); + str = g_value_get_string (value); + priv->protocol = str ? g_ascii_strdown (str, -1) : NULL; break; case PROP_ENCAPSULATION: g_free (priv->encapsulation); - priv->encapsulation = g_ascii_strdown (g_value_get_string (value), -1); + str = g_value_get_string (value); + priv->encapsulation = str ? g_ascii_strdown (str, -1) : NULL; break; case PROP_VPI: priv->vpi = g_value_get_uint (value); |