diff options
author | Emmanuele Bassi <ebassi@gmail.com> | 2020-11-23 15:41:03 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gmail.com> | 2020-11-23 15:41:03 +0000 |
commit | d7de7202758d376e79a431e0e77577292f3bc113 (patch) | |
tree | 8d66ee98a03b2cc4c489e25197e35ddb49c21e5a | |
parent | fd3a6299ce0d325d332ec3630a756ddc94ecd76a (diff) | |
parent | ef86e46238df288cccc2addf58512d010279192d (diff) | |
download | gtk+-d7de7202758d376e79a431e0e77577292f3bc113.tar.gz |
Merge branch 'ebassi/for-master' into 'master'
Ebassi/for master
See merge request GNOME/gtk!2876
-rw-r--r-- | gtk/a11y/gtkatspicontext.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gtk/a11y/gtkatspicontext.c b/gtk/a11y/gtkatspicontext.c index 10eecbdfe4..46b157a3fa 100644 --- a/gtk/a11y/gtkatspicontext.c +++ b/gtk/a11y/gtkatspicontext.c @@ -1598,7 +1598,7 @@ get_bus_address_dbus (GdkDisplay *display) if (error != NULL) { - g_critical ("Unable to acquire session bus: %s", error->message); + GTK_NOTE (A11Y, g_message ("Unable to acquire session bus: %s", error->message)); g_error_free (error); return NULL; } @@ -1615,8 +1615,8 @@ get_bus_address_dbus (GdkDisplay *display) &error); if (error != NULL) { - g_critical ("Unable to acquire the address of the accessibility bus: %s", - error->message); + GTK_NOTE (A11Y, g_message ("Unable to acquire the address of the accessibility bus: %s", + error->message)); g_error_free (error); } @@ -1711,9 +1711,17 @@ gtk_at_spi_create_context (GtkAccessibleRole accessible_role, g_return_val_if_fail (GTK_IS_ACCESSIBLE (accessible), NULL); g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL); - const char *bus_address = get_bus_address (display); + static const char *bus_address; if (bus_address == NULL) + { + bus_address = get_bus_address (display); + + if (bus_address == NULL) + bus_address = ""; + } + + if (*bus_address == '\0') return NULL; #if defined(GDK_WINDOWING_WAYLAND) |