mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-22 10:46:59 +00:00
libnm-core/libnm-util: fix an assertion in adsl setting
(process:7799): GLib-CRITICAL **: g_ascii_strdown: assertion 'str != NULL' failed
This commit is contained in:
parent
5221180a20
commit
3d64d45d16
|
@ -266,6 +266,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:
|
||||
|
@ -281,11 +282,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);
|
||||
|
|
|
@ -286,6 +286,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:
|
||||
|
@ -301,11 +302,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);
|
||||
|
|
Loading…
Reference in a new issue