core: fix singleton handling in NULL/systemd session monitor
This commit is contained in:

committed by
Jiří Klimeš

parent
410ac72325
commit
49106d8845
@@ -84,7 +84,9 @@ nm_session_monitor_get (void)
|
|||||||
if (singleton)
|
if (singleton)
|
||||||
return g_object_ref (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)
|
if (singleton)
|
||||||
return g_object_ref (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
|
gboolean
|
||||||
|
Reference in New Issue
Block a user