[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 42052686752 2/2: Don't mark selection request events
From: |
Po Lu |
Subject: |
emacs-29 42052686752 2/2: Don't mark selection request events |
Date: |
Thu, 25 May 2023 20:43:46 -0400 (EDT) |
branch: emacs-29
commit 42052686752e399e778d33401dd621afbac0071d
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Don't mark selection request events
* src/pgtkterm.c (mark_pgtkterm): Prevent crash by not marking
selection request events, which don't have Lisp_Object members.
---
src/pgtkterm.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index c00e13550bd..f4b05ef9903 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -376,6 +376,13 @@ mark_pgtkterm (void)
for (i = 0; i < n; i++)
{
union buffered_input_event *ev = &evq->q[i];
+
+ /* Selection requests don't have Lisp object members. */
+
+ if (ev->ie.kind == SELECTION_REQUEST_EVENT
+ || ev->ie.kind == SELECTION_CLEAR_EVENT)
+ continue;
+
mark_object (ev->ie.x);
mark_object (ev->ie.y);
mark_object (ev->ie.frame_or_window);