on xenial help sign in
Only emit if we can connect to upstart
2535debTed Gould
plugins/Unity/Indicators/indicatorsmanager.cpp+8−6
@@ -235,13 +235,15 @@ void IndicatorsManager::setLoaded(bool loaded)
235 m_loaded = loaded;
235 m_loaded = loaded;
236 Q_EMIT loadedChanged(m_loaded);
236 Q_EMIT loadedChanged(m_loaded);
237
237
238+ if (m_upstart != NULL) {
238− DBusPendingCall * pending = NULL;
239+ DBusPendingCall * pending = NULL;
239− if (m_loaded) {
240+ if (m_loaded) {
240− pending = upstart_emit_event(m_upstart, "indicator-services-start", NULL, 0, NULL, NULL, NULL, 100);
241+ pending = upstart_emit_event(m_upstart, "indicator-services-start", NULL, 0, NULL, NULL, NULL, 100);
241− } else {
242+ } else {
242− pending = upstart_emit_event(m_upstart, "indicator-services-end", NULL, 0, NULL, NULL, NULL, 100);
243+ pending = upstart_emit_event(m_upstart, "indicator-services-end", NULL, 0, NULL, NULL, NULL, 100);
244+ }
245+ dbus_pending_call_unref(pending);
243 }
246 }
244− dbus_pending_call_unref(pending);
245 }
247 }
246}
248}
247
249