diff options
Diffstat (limited to 'src/nm-session-monitor-ck.c')
| -rw-r--r-- | src/nm-session-monitor-ck.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nm-session-monitor-ck.c b/src/nm-session-monitor-ck.c index 02e2d06e..75e1c927 100644 --- a/src/nm-session-monitor-ck.c +++ b/src/nm-session-monitor-ck.c @@ -354,10 +354,8 @@ nm_session_monitor_get (void) { static NMSessionMonitor *singleton = NULL; - if (singleton) - return g_object_ref (singleton); - - singleton = NM_SESSION_MONITOR (g_object_new (NM_TYPE_SESSION_MONITOR, NULL)); + if (!singleton) + singleton = NM_SESSION_MONITOR (g_object_new (NM_TYPE_SESSION_MONITOR, NULL)); return singleton; } |