[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#56372: 29.0.50; [PATCH] Avoid BadMatch X11 error
From: |
dick |
Subject: |
bug#56372: 29.0.50; [PATCH] Avoid BadMatch X11 error |
Date: |
Mon, 04 Jul 2022 00:50:09 -0400 |
User-agent: |
Gnus/5.14 (Gnus v5.14) Commercial/29.0.50 (gnu/linux) |
>From 5d2442a836a5641f8f1c2b4a844fe510a77bd8c5 Mon Sep 17 00:00:00 2001
From: dickmao <dick.r.chiang@gmail.com>
Date: Mon, 4 Jul 2022 00:47:34 -0400
Subject: [PATCH] Avoid segfault
* src/xterm.c (x_connection_closed): Avoid segfault.
---
src/xterm.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/src/xterm.c b/src/xterm.c
index c5acb450837..464887da975 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -23518,17 +23518,18 @@ x_connection_closed (Display *dpy, const char
*error_message, bool ioerror)
fprintf (stderr, "X error handlers currently installed:\n");
- for (failable = dpyinfo->failable_requests;
- failable < dpyinfo->next_failable_request;
- ++failable)
- {
- if (failable->end)
- fprintf (stderr, "Ignoring errors between %lu to %lu\n",
- failable->start, failable->end);
- else
- fprintf (stderr, "Ignoring errors from %lu onwards\n",
- failable->start);
- }
+ if (dpyinfo)
+ for (failable = dpyinfo->failable_requests;
+ failable < dpyinfo->next_failable_request;
+ ++failable)
+ {
+ if (failable->end)
+ fprintf (stderr, "Ignoring errors between %lu to %lu\n",
+ failable->start, failable->end);
+ else
+ fprintf (stderr, "Ignoring errors from %lu onwards\n",
+ failable->start);
+ }
for (stack = x_error_message; stack; stack = stack->prev)
fprintf (stderr, "Trapping errors from %lu\n",
--
2.36.1