From 4304e667870709f29f0fda9e5fbc56cdd81744cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sat, 27 Aug 2016 00:16:27 +0200 Subject: catch absurd but possible div-by-zero --- src/Toolbar.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Toolbar.cc b/src/Toolbar.cc index 3ceb880..92ab81a 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc @@ -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; } -- cgit v0.11.2