[gtk] Check for the session bus before using it



commit 7e7c90961c91346a28ca33c7fe78c1f357fb022c
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 e83265091c..25766aaae2 100644
--- a/gtk/gtkapplication-dbus.c
+++ b/gtk/gtkapplication-dbus.c
@@ -424,7 +424,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]