From: Po Lu Date: Fri, 26 May 2023 00:43:18 +0000 (+0800) Subject: Don't mark selection request events X-Git-Tag: emacs-29.0.92~95 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=42052686752e399e778d33401dd621afbac0071d;p=emacs.git 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. --- 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);