From: Po Lu Date: Mon, 30 May 2022 01:07:27 +0000 (+0800) Subject: Fix crash when loading Postscript images X-Git-Tag: emacs-29.0.90~1910^2~342 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e2e232933c6f944b1dda7c578425b34f1e160e7f;p=emacs.git Fix crash when loading Postscript images * src/xterm.c (handle_one_xevent): Catch errors around `x_kill_gs_process'. --- 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;