diff options
Diffstat (limited to 'libnm-util/nm-setting-adsl.c')
| -rw-r--r-- | libnm-util/nm-setting-adsl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libnm-util/nm-setting-adsl.c b/libnm-util/nm-setting-adsl.c index 5355011c..51560a78 100644 --- a/libnm-util/nm-setting-adsl.c +++ b/libnm-util/nm-setting-adsl.c @@ -287,6 +287,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: @@ -302,11 +303,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); |