summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2017-01-26 14:18:20 +0100
committerLubomir Rintel <lkundrak@v3.sk>2017-01-27 13:33:28 +0100
commit59b497f0f00a43c0bca9316fddd6de0777ec7f5c (patch)
tree494690685ac33f3a35988af52bda14d513f75fba
parent93b632a7fac494deff8ea3c8a1fe00db277df358 (diff)
downloadNetworkManager-59b497f0f00a43c0bca9316fddd6de0777ec7f5c.tar.gz
manager: guard the flag setting by the actual device presence
The parent might be an active connection w/o the device being determined.
-rw-r--r--src/nm-manager.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c
index 0c1d36e1f6..a3215bd8f5 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -3126,8 +3126,10 @@ _internal_activate_device (NMManager *self, NMActiveConnection *active, GError *
* decides to go unmanaged while we're activating (perhaps because other slaves
* go away leaving him with no kids).
*/
- nm_device_set_unmanaged_by_flags (master_device, NM_UNMANAGED_EXTERNAL_DOWN,
- NM_UNMAN_FLAG_OP_FORGET, NM_DEVICE_STATE_REASON_USER_REQUESTED);
+ if (master_device) {
+ nm_device_set_unmanaged_by_flags (master_device, NM_UNMANAGED_EXTERNAL_DOWN,
+ NM_UNMAN_FLAG_OP_FORGET, NM_DEVICE_STATE_REASON_USER_REQUESTED);
+ }
nm_active_connection_set_master (active, master_ac);
_LOGD (LOGD_CORE, "Activation of '%s' depends on active connection %p %s",