mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 16:10:11 +01:00
libnm-glib: don't crash when adding new connections that aren't waited upon
If we're not waiting for this connection to show up after an AddConnection operation, we don't need to touch anything addinfo-related.
This commit is contained in:
parent
e041fabcfd
commit
7fa1a62cd3
1 changed files with 4 additions and 1 deletions
|
|
@ -155,6 +155,8 @@ add_connection_info_complete (NMRemoteSettings *self,
|
|||
AddConnectionInfo *info,
|
||||
GError *error)
|
||||
{
|
||||
g_return_if_fail (info != NULL);
|
||||
|
||||
info->callback (info->self, error ? NULL : info->connection, error, info->callback_data);
|
||||
add_connection_info_dispose (self, info);
|
||||
}
|
||||
|
|
@ -242,7 +244,8 @@ connection_init_result_cb (NMRemoteConnection *remote,
|
|||
/* If there's a pending AddConnection request, complete that here before
|
||||
* signaling new-connection.
|
||||
*/
|
||||
add_connection_info_complete (self, addinfo, NULL);
|
||||
if (addinfo)
|
||||
add_connection_info_complete (self, addinfo, NULL);
|
||||
|
||||
/* Finally, let users know of the new connection now that it has all
|
||||
* its settings and is valid.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue