[gtk/gtk-3-24] Check for the session bus before using it



commit 4eee51b0e50d4c2700824e22b297cd8bae487068
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jan 2 20:35:19 2019 -0500

    Check for the session bus before using it
    
    Patch by Chris Allen, #475

 gtk/gtkapplication-dbus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkapplication-dbus.c b/gtk/gtkapplication-dbus.c
index 03aca7345c..05af8f2ecc 100644
--- a/gtk/gtkapplication-dbus.c
+++ b/gtk/gtkapplication-dbus.c
@@ -421,7 +421,7 @@ gtk_application_impl_dbus_startup (GtkApplicationImpl *impl,
                   "gtk-shell-shows-menubar", FALSE,
                   NULL);
 
-  if (dbus->sm_proxy == NULL)
+  if (dbus->sm_proxy == NULL && dbus->session)
     {
       dbus->inhibit_proxy = gtk_application_get_proxy_if_service_present (dbus->session,
                                                                           G_DBUS_PROXY_FLAGS_NONE,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]