Mercurial > hg > xemacs-beta
diff src/window.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 | 4d52aea479a2 |
children | 719ceea8b3cb |
line wrap: on
line diff
--- a/src/window.c Sat Nov 11 22:51:05 2006 +0000 +++ b/src/window.c Sun Nov 12 13:40:09 2006 +0000 @@ -4250,7 +4250,7 @@ int include_margins_p) { int avail_width; - int char_width; + int char_width = 0; int defheight, defwidth; Lisp_Object window = wrap_window (w); @@ -4263,7 +4263,8 @@ default_face_height_and_width (window, &defheight, &defwidth); - char_width = (avail_width / defwidth); + if (defwidth) + char_width = (avail_width / defwidth); /* It's the calling function's responsibility to check these values and make sure they're not out of range.