Mercurial > hg > xemacs-beta
diff src/frame-x.c @ 3676:3ef0aaf3dc34
[xemacs-hg @ 2006-11-12 13:40:04 by aidan]
Prevent a crash if the ASCII charset registries match nothing.
author | aidan |
---|---|
date | Sun, 12 Nov 2006 13:40:09 +0000 |
parents | 3aab51033467 |
children | 229bd619740a |
line wrap: on
line diff
--- a/src/frame-x.c Sat Nov 11 22:51:05 2006 +0000 +++ b/src/frame-x.c Sun Nov 12 13:40:09 2006 +0000 @@ -2734,6 +2734,17 @@ { Lisp_Object font = FACE_FONT (Vdefault_face, frame, Vcharset_ascii); + /* It may be that instantiating the font has deleted the frame (will + happen if the user has specified a charset registry for ASCII that + isn't available on the server, and our fallback of iso8859-1 isn't + available; something vanishingly rare.) In that case, return from + this function without further manipulation of the dead frame. */ + + if (!FRAME_LIVE_P(frm)) + { + return; + } + /* #### what to do about Xft? I don't think the font is actually used to compute cell size for computing frame pixel dimensions (see call to EmacsFrameRecomputeCellSize() below); where is it used? -- sjt