diff options
author | Mike Gorse <mgorse@suse.com> | 2023-05-17 16:18:51 -0500 |
---|---|---|
committer | Mike Gorse <mgorse@suse.com> | 2023-05-17 16:22:27 -0500 |
commit | 37e7d3c77c5175aed382c498bffb876ea0c8581b (patch) | |
tree | aaa62d5538bdf664390673ec6d2641f8f75a0664 /atspi/atspi-device-x11.c | |
parent | 1c4de77eaef8ad644e8a6a8a2e251c84017be324 (diff) | |
download | at-spi2-core-37e7d3c77c5175aed382c498bffb876ea0c8581b.tar.gz |
If this is not done, then the device might be finalized from under us during
a callback, leading to a crash.
Diffstat (limited to 'atspi/atspi-device-x11.c')
-rw-r--r-- | atspi/atspi-device-x11.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/atspi/atspi-device-x11.c b/atspi/atspi-device-x11.c index 16fb1636..1c0bee89 100644 --- a/atspi/atspi-device-x11.c +++ b/atspi/atspi-device-x11.c @@ -330,6 +330,7 @@ do_event_dispatch (gpointer user_data) XComposeStatus status; guint modifiers; + g_object_ref (device); while (XPending (display)) { XNextEvent (display, &xevent); @@ -392,6 +393,8 @@ do_event_dispatch (gpointer user_data) continue; } } + + g_object_unref (device); return TRUE; } |