core: fix singleton handling in NULL/systemd session monitor

This commit is contained in:
Thomas Bechtold
2012-02-07 13:37:44 +01:00
committed by Jiří Klimeš
parent 410ac72325
commit 49106d8845
2 changed files with 6 additions and 2 deletions

View File

@@ -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;
}
/* ---------------------------------------------------------------------------------------------------- */