[gtk/wip/baedert/for-master: 1/4] inspector: Add a type check
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 1/4] inspector: Add a type check
- Date: Sat, 1 Aug 2020 06:59:51 +0000 (UTC)
commit bf24da0d80188964fd477d07dedad5221a85cb96
Author: Timm Bäder <mail baedert org>
Date: Sat Aug 1 07:58:36 2020 +0200
inspector: Add a type check
We only connect to this signal if sl->obejct is a GtkAccessible, so only
disconnect from it on the same condition.
Fixes #2980
gtk/inspector/a11y.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/inspector/a11y.c b/gtk/inspector/a11y.c
index 8207c47d52..49934a4a0e 100644
--- a/gtk/inspector/a11y.c
+++ b/gtk/inspector/a11y.c
@@ -390,7 +390,8 @@ gtk_inspector_a11y_set_object (GtkInspectorA11y *sl,
GtkWidget *stack;
GtkStackPage *page;
GtkATContext *context;
- if (sl->object)
+
+ if (sl->object && GTK_IS_ACCESSIBLE (sl->object))
{
context = gtk_accessible_get_at_context (GTK_ACCESSIBLE (sl->object));
g_signal_handlers_disconnect_by_func (context, refresh_all, sl);
@@ -426,7 +427,7 @@ dispose (GObject *o)
{
GtkInspectorA11y *sl = GTK_INSPECTOR_A11Y (o);
- if (sl->object)
+ if (sl->object && GTK_IS_ACCESSIBLE (sl->object))
{
GtkATContext *context;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]