network: Add sanity checks NetDevice and NetObject
https://bugzilla.gnome.org/show_bug.cgi?id=746411
This commit is contained in:
parent
219a94ed1e
commit
234ed23138
2 changed files with 3 additions and 0 deletions
|
@ -227,6 +227,7 @@ state_changed_cb (NMDevice *device,
|
|||
NMDevice *
|
||||
net_device_get_nm_device (NetDevice *device)
|
||||
{
|
||||
g_return_val_if_fail (NET_IS_DEVICE (device), NULL);
|
||||
return device->priv->nm_device;
|
||||
}
|
||||
|
||||
|
|
|
@ -263,9 +263,11 @@ net_object_set_property (GObject *object_,
|
|||
g_object_add_weak_pointer (G_OBJECT (priv->remote_settings), (gpointer *) (&priv->remote_settings));
|
||||
break;
|
||||
case PROP_CANCELLABLE:
|
||||
g_assert (!priv->cancellable);
|
||||
priv->cancellable = g_value_dup_object (value);
|
||||
break;
|
||||
case PROP_PANEL:
|
||||
g_assert (!priv->panel);
|
||||
priv->panel = g_value_get_pointer (value);
|
||||
if (priv->panel)
|
||||
g_object_add_weak_pointer (G_OBJECT (priv->panel), (gpointer *) (&priv->panel));
|
||||
|
|
Loading…
Add table
Reference in a new issue