]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix crash when loading Postscript images
authorPo Lu <luangruo@yahoo.com>
Mon, 30 May 2022 01:07:27 +0000 (09:07 +0800)
committerPo Lu <luangruo@yahoo.com>
Mon, 30 May 2022 01:07:27 +0000 (09:07 +0800)
* src/xterm.c (handle_one_xevent): Catch errors around
`x_kill_gs_process'.

src/xterm.c

index ab36c1681a8804c33f6fc2627f41d31d84b088ed..996e19492608da2625879e718d1d9f5e0fb67525 100644 (file)
@@ -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;