From e2e232933c6f944b1dda7c578425b34f1e160e7f Mon Sep 17 00:00:00 2001 From: Po Lu Date: Mon, 30 May 2022 09:07:27 +0800 Subject: [PATCH] Fix crash when loading Postscript images * src/xterm.c (handle_one_xevent): Catch errors around `x_kill_gs_process'. --- src/xterm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xterm.c b/src/xterm.c index ab36c1681a8..996e1949260 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -15260,7 +15260,11 @@ handle_one_xevent (struct x_display_info *dpyinfo, goto OTHER; #ifndef USE_CAIRO Pixmap pixmap = (Pixmap) event->xclient.data.l[1]; + /* FIXME: why does this sometimes generate a BadMatch + error? */ + x_catch_errors (dpyinfo->display); x_kill_gs_process (pixmap, f); + x_uncatch_errors (); expose_frame (f, 0, 0, 0, 0); #endif /* !USE_CAIRO */ goto done; -- 2.39.2