Merge from emacs--devo--0
[bpt/emacs.git] / src / xdisp.c
index b1404d9..0ee3b19 100644 (file)
@@ -9829,7 +9829,7 @@ redisplay_tool_bar (f)
        border = 0;
 
       rows = f->n_tool_bar_rows;
-      height = (it.last_visible_y - border) / rows;
+      height = max (1, (it.last_visible_y - border) / rows);
       extra = it.last_visible_y - border - height * rows;
 
       while (it.current_y < it.last_visible_y)