[gtk/a11y/component: 178/183] atspi: Be more careful
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/a11y/component: 178/183] atspi: Be more careful
- Date: Mon, 19 Oct 2020 16:09:48 +0000 (UTC)
commit dfe00c4ac46c39b26077dfdec57356a985502f62
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Oct 19 11:55:44 2020 -0400
atspi: Be more careful
We have non-widget accessibles now, so guard against
change notification being emitted on them.
gtk/a11y/gtkatspicontext.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/gtk/a11y/gtkatspicontext.c b/gtk/a11y/gtkatspicontext.c
index 53b39c4743..12775e94cd 100644
--- a/gtk/a11y/gtkatspicontext.c
+++ b/gtk/a11y/gtkatspicontext.c
@@ -787,9 +787,14 @@ gtk_at_spi_context_state_change (GtkATContext *ctx,
GtkAccessibleAttributeSet *relations)
{
GtkAtSpiContext *self = GTK_AT_SPI_CONTEXT (ctx);
- GtkWidget *widget = GTK_WIDGET (gtk_at_context_get_accessible (ctx));
+ GtkAccessible *accessible = gtk_at_context_get_accessible (ctx);
+ GtkWidget *widget;
GtkAccessibleValue *value;
+ if (!GTK_IS_WIDGET (accessible))
+ return;
+
+ widget = GTK_WIDGET (accessible);
if (!gtk_widget_get_realized (widget))
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]