device: accept NULL plink

For PPP devices we can't create a link in advance, as the link is
created by pppd when the connection is established.
This commit is contained in:
Beniamino Galvani 2017-06-30 17:49:44 +02:00
parent 8665cdfeff
commit 695f6ceebb

View file

@ -2911,8 +2911,10 @@ nm_device_create_and_realize (NMDevice *self,
if (NM_DEVICE_GET_CLASS (self)->create_and_realize) {
if (!NM_DEVICE_GET_CLASS (self)->create_and_realize (self, connection, parent, &plink, error))
return FALSE;
plink_copy = *plink;
plink = &plink_copy;
if (plink) {
plink_copy = *plink;
plink = &plink_copy;
}
}
realize_start_setup (self, plink,