Commit 75722075 authored by Paul Quinn's avatar Paul Quinn Committed by Alexandre Julliard

Stop a listbox bug that causes a div by zero when the item height

is zero. Doesn't solve the root of the problem though.
parent 594d5dd7
...@@ -297,7 +297,8 @@ static void LISTBOX_UpdatePage( WND *wnd, LB_DESCR *descr ) ...@@ -297,7 +297,8 @@ static void LISTBOX_UpdatePage( WND *wnd, LB_DESCR *descr )
{ {
INT page_size; INT page_size;
if ((page_size = descr->height / descr->item_height) < 1) page_size = 1; if ((descr->item_height == 0) || (page_size = descr->height / descr->item_height) < 1)
page_size = 1;
if (page_size == descr->page_size) return; if (page_size == descr->page_size) return;
descr->page_size = page_size; descr->page_size = page_size;
if (descr->style & LBS_MULTICOLUMN) if (descr->style & LBS_MULTICOLUMN)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment