From dc37090d6e26f561b8f89e7afe8e2c3fa3543608 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sat, 10 Dec 2022 19:26:54 +0800 Subject: [PATCH] Improve X error messages * src/xterm.c (x_connection_closed): Don't print handler blurb if nothing is there to be printed. --- src/xterm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 872326392a6..c6fa29943bf 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -26048,9 +26048,10 @@ For details, see etc/PROBLEMS.\n", if (!ioerror && dpyinfo) { /* Dump the list of error handlers for debugging - purposes. */ + purposes if the list exists. */ - fprintf (stderr, "X error handlers currently installed:\n"); + if (dpyinfo->failable_requests || x_error_message) + fprintf (stderr, "X error handlers currently installed:\n"); for (failable = dpyinfo->failable_requests; failable < dpyinfo->next_failable_request; -- 2.39.2