Commit 54489b5c authored by Murray Cumming's avatar Murray Cumming
Browse files

EggSpreadTable: Avoid a division by null if there are no lines.

Found by Coverity Scan (while scanning Glom).
parent ed51c73b
......@@ -490,7 +490,12 @@ get_spread_table_dimensions (EggSpreadTableDnd *spread_table,
*item_spacing = local_item_spacing;
if (line_width)
*line_width = (local_full_size - (local_spacing * (lines -1))) / lines;
{
if (lines == 0)
*line_width = 0;
else
*line_width = (local_full_size - (local_spacing * (lines -1))) / lines;
}
}
static void
......
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