catch absurd but possible div-by-zero

This commit is contained in:
Thomas Lübking 2016-08-27 00:16:27 +02:00
parent d4e9bb7656
commit 4304e66787

View file

@ -936,7 +936,7 @@ void Toolbar::rearrangeItems() {
if (relative_items) {
if (relative_width <= width - fixed_width && stretch_items) {
relative_width = int(width - fixed_width - relative_width)/stretch_items;
} else {
} else if (relative_width) {
stretch_factor = float(width - fixed_width)/relative_width;
relative_width = 0;
}