[gtk/ebassi/for-master: 2/7] a11y: Add a fallback for the root base path
- From: Emmanuele Bassi <ebassi src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gtk/ebassi/for-master: 2/7] a11y: Add a fallback for the root base path
 
- Date: Thu, 19 Nov 2020 15:21:04 +0000 (UTC)
 
commit b37634dcd5c76f6a1294cd1d73bd7bd7dcb9a43b
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Thu Nov 19 14:24:47 2020 +0000
    a11y: Add a fallback for the root base path
    
    In case g_get_prgname() returns NULL, which seems to be the case for the
    GTK tests.
 gtk/a11y/gtkatspiroot.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/gtk/a11y/gtkatspiroot.c b/gtk/a11y/gtkatspiroot.c
index ca7730a018..48c9e60676 100644
--- a/gtk/a11y/gtkatspiroot.c
+++ b/gtk/a11y/gtkatspiroot.c
@@ -665,8 +665,10 @@ gtk_at_spi_root_constructed (GObject *gobject)
     }
   else
     {
+      const char *program_name = g_get_prgname ();
+
       self->base_path = g_strconcat ("/org/gtk/application/",
-                                     g_get_prgname (),
+                                     program_name != NULL ? program_name : "unknown",
                                      "/a11y",
                                      NULL);
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]