From 695f6ceebb7c2cc96e50e3156e7938616e021553 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Fri, 30 Jun 2017 17:49:44 +0200 Subject: [PATCH] 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. --- src/devices/nm-device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 1530b60716..321f7cf8ca 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -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,