If a context is not realized, calling gtk_at_spi_context_to_ref() will
return a null ref, because its path has not been initialized yet. This
was already done for all other cases in get_parent_context_ref(), but
was missing for the GtkStackPage case.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4944
gtk_accessible_get_at_context (GTK_ACCESSIBLE (parent));
if (parent_context != NULL)
- res = gtk_at_spi_context_to_ref (GTK_AT_SPI_CONTEXT (parent_context));
+ {
+ gtk_at_context_realize (parent_context);
+
+ res = gtk_at_spi_context_to_ref (GTK_AT_SPI_CONTEXT (parent_context));
+ }
}
if (res == NULL)