# HG changeset patch # User michaels # Date 1163873875 0 # Node ID 719ceea8b3cb9d8c51fad70c5d8649a78b56c893 # Parent 5bab930875e21001183ed863d2ef0d99e50a02ed [xemacs-hg @ 2006-11-18 18:17:53 by michaels] 2006-11-18 Mike Sperber * window.c (window_pixel_height_to_char_height): Cater to the possibility that defheight may be 0. diff -r 5bab930875e2 -r 719ceea8b3cb src/ChangeLog --- a/src/ChangeLog Fri Nov 17 22:51:06 2006 +0000 +++ b/src/ChangeLog Sat Nov 18 18:17:55 2006 +0000 @@ -1,3 +1,8 @@ +2006-11-18 Mike Sperber + + * window.c (window_pixel_height_to_char_height): Cater to the + possibility that defheight may be 0. + 2006-11-15 Aidan Kehoe * mule-charset.c: diff -r 5bab930875e2 -r 719ceea8b3cb src/window.c --- a/src/window.c Fri Nov 17 22:51:06 2006 +0000 +++ b/src/window.c Sat Nov 18 18:17:55 2006 +0000 @@ -4107,7 +4107,7 @@ { int avail_height; int defheight, defwidth; - int char_height; + int char_height = 0; Lisp_Object window = wrap_window (w); @@ -4118,7 +4118,8 @@ default_face_height_and_width (window, &defheight, &defwidth); - char_height = avail_height / defheight; + if (defheight) + char_height = avail_height / defheight; /* It's the calling function's responsibility to check these values and make sure they're not out of range.