From 9aabf64c78017a55dedab5481ed20776c57f284b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Tue, 8 Feb 2011 08:19:20 +0100 Subject: [PATCH] * nsterm.m (setFrame, initFrame): Make sure pixel_height doesn't become zero. Fixes: debbugs:7348 --- src/ChangeLog | 5 +++++ src/nsterm.m | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 2b02030fd4f..2df187383a4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-02-08 Jan Djärv + + * nsterm.m (setFrame, initFrame): Make sure pixel_height doesn't become + zero (Bug#7348). + 2011-02-03 Glenn Morris * xfaces.c (Finternal_set_lisp_face_attribute): diff --git a/src/nsterm.m b/src/nsterm.m index addb6d01d71..30b73c2fd13 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -5721,6 +5721,7 @@ ns_term_shutdown (int sig) win = nwin; condemned = NO; pixel_height = NSHeight (r); + if (pixel_height == 0) pixel_height = 1; min_portion = 20 / pixel_height; frame = XFRAME (XWINDOW (win)->frame); @@ -5750,6 +5751,7 @@ ns_term_shutdown (int sig) NSTRACE (EmacsScroller_setFrame); /* BLOCK_INPUT; */ pixel_height = NSHeight (newRect); + if (pixel_height == 0) pixel_height = 1; min_portion = 20 / pixel_height; [super setFrame: newRect]; [self display]; -- 2.39.2