From: Gerd Moellmann Date: Tue, 25 Sep 2001 17:43:10 +0000 (+0000) Subject: (x_kill_gs_process): Recognize if someone has cleared X-Git-Tag: emacs-21.1~165 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=daba7643145774bf021cd91407d056d99e91f008;p=emacs.git (x_kill_gs_process): Recognize if someone has cleared the image cache under us. --- diff --git a/src/ChangeLog b/src/ChangeLog index 509cd8d4005..248d3ac5ad7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2001-09-25 Gerd Moellmann + * xfns.c (x_kill_gs_process): Recognize if someone has cleared + the image cache under us. + * xdisp.c (display_mode_element): If the mode element is a symbol with a string value, use that string's multibyteness for displaying. diff --git a/src/xfns.c b/src/xfns.c index e2690e7a30e..cc778d833e3 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -10117,9 +10117,13 @@ x_kill_gs_process (pixmap, f) if (c->images[i]->pixmap == pixmap) break; + /* Should someone in between have cleared the image cache, for + instance, give up. */ + if (i == c->used) + return; + /* Kill the GS process. We should have found PIXMAP in the image cache and its image should contain a process object. */ - xassert (i < c->used); img = c->images[i]; xassert (PROCESSP (img->data.lisp_val)); Fkill_process (img->data.lisp_val, Qnil);