diff options
Diffstat (limited to 'src/nm-session-monitor-null.c')
| -rw-r--r-- | src/nm-session-monitor-null.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/nm-session-monitor-null.c b/src/nm-session-monitor-null.c index beabcf21..5d8ecaaf 100644 --- a/src/nm-session-monitor-null.c +++ b/src/nm-session-monitor-null.c @@ -81,11 +81,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)); - g_assert (singleton); + if (!singleton) + singleton = g_object_new (NM_TYPE_SESSION_MONITOR, NULL); return singleton; } |