a11y: Use fallback logic when GApplication has no DBus object path
authorBarnabás Pőcze <pobrn@protonmail.com>
Sun, 8 Jan 2023 18:51:38 +0000 (19:51 +0100)
committerBarnabás Pőcze <pobrn@protonmail.com>
Sun, 8 Jan 2023 18:58:54 +0000 (19:58 +0100)
Use the fallback logic to generate the base path for the GtkAtSpiRoot
if the GApplication has no DBus object path to guarantee that
the base path will not stay NULL.

gtk/a11y/gtkatspiroot.c

index b39d0938d4572b81f4c34326e3c03b20d4958b35..78c4d7c0de0c0eebbc84f1288db3adfc5453cfe4 100644 (file)
@@ -690,7 +690,8 @@ gtk_at_spi_root_constructed (GObject *gobject)
       /* No need to validate the path */
       self->base_path = g_strconcat (app_path, "/a11y", NULL);
     }
-  else
+
+  if (self->base_path == NULL)
     {
       const char *program_name = g_get_prgname ();