diff src/window.c @ 3687:719ceea8b3cb

[xemacs-hg @ 2006-11-18 18:17:53 by michaels] 2006-11-18 Mike Sperber <mike@xemacs.org> * window.c (window_pixel_height_to_char_height): Cater to the possibility that defheight may be 0.
author michaels
date Sat, 18 Nov 2006 18:17:55 +0000
parents 3ef0aaf3dc34
children f6f6fc9eb269
line wrap: on
line diff
--- 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.