comparison 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
comparison
equal deleted inserted replaced
3675:0492077a2e85 3676:3ef0aaf3dc34
2731 MARK_FRAME_CHANGED (frm); 2731 MARK_FRAME_CHANGED (frm);
2732 } 2732 }
2733 else if (EQ (name, Qfont)) 2733 else if (EQ (name, Qfont))
2734 { 2734 {
2735 Lisp_Object font = FACE_FONT (Vdefault_face, frame, Vcharset_ascii); 2735 Lisp_Object font = FACE_FONT (Vdefault_face, frame, Vcharset_ascii);
2736
2737 /* It may be that instantiating the font has deleted the frame (will
2738 happen if the user has specified a charset registry for ASCII that
2739 isn't available on the server, and our fallback of iso8859-1 isn't
2740 available; something vanishingly rare.) In that case, return from
2741 this function without further manipulation of the dead frame. */
2742
2743 if (!FRAME_LIVE_P(frm))
2744 {
2745 return;
2746 }
2736 2747
2737 /* #### what to do about Xft? I don't think the font is actually used 2748 /* #### what to do about Xft? I don't think the font is actually used
2738 to compute cell size for computing frame pixel dimensions (see call 2749 to compute cell size for computing frame pixel dimensions (see call
2739 to EmacsFrameRecomputeCellSize() below); where is it used? -- sjt 2750 to EmacsFrameRecomputeCellSize() below); where is it used? -- sjt
2740 What does XtSetValues() do if that resource isn't present? */ 2751 What does XtSetValues() do if that resource isn't present? */