mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 17:00:08 +01:00
core: fix singleton handling in NULL/systemd session monitor
This commit is contained in:
parent
410ac72325
commit
49106d8845
2 changed files with 6 additions and 2 deletions
|
|
@ -84,7 +84,9 @@ nm_session_monitor_get (void)
|
|||
if (singleton)
|
||||
return g_object_ref (singleton);
|
||||
|
||||
return NM_SESSION_MONITOR (g_object_new (NM_TYPE_SESSION_MONITOR, NULL));
|
||||
singleton = NM_SESSION_MONITOR (g_object_new (NM_TYPE_SESSION_MONITOR, NULL));
|
||||
assert (singleton);
|
||||
return singleton;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
|
|
|||
|
|
@ -195,7 +195,9 @@ nm_session_monitor_get (void)
|
|||
if (singleton)
|
||||
return g_object_ref (singleton);
|
||||
|
||||
return NM_SESSION_MONITOR (g_object_new (NM_TYPE_SESSION_MONITOR, NULL));
|
||||
singleton = NM_SESSION_MONITOR (g_object_new (NM_TYPE_SESSION_MONITOR, NULL));
|
||||
assert (singleton);
|
||||
return singleton;
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue