network: don't try to update device if it doesn't exist

All of the following code assumes that self->device is valid, so we need
to skip over it. It's confusing, but this is a multipurpose dialog and
self->device is optional when creating the dialog. E.g. when modifying
VPN configuration, we update just the configuration, not an NMDevice.
This commit is contained in:
Michael Catanzaro 2023-08-25 10:12:45 -05:00 committed by Felipe Borges
parent 3f6737dbf7
commit 60b4956c05

View file

@ -271,6 +271,11 @@ apply_clicked_cb (NetConnectionEditor *self)
eap_method_ca_cert_ignore_save (self->connection);
if (!self->device) {
update_complete (self, TRUE);
return;
}
if (self->is_new_connection) {
nm_client_add_connection_async (self->client,
self->orig_connection,