aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lübking <thomas.luebking@gmail.com>2016-08-26 22:16:27 (GMT)
committerThomas Lübking <thomas.luebking@gmail.com>2016-08-26 22:37:52 (GMT)
commit4304e667870709f29f0fda9e5fbc56cdd81744cc (patch)
treeb959a6499c3729323cf88869f4a15c0aa76c6710
parentd4e9bb7656ee95eeb796f26671037d4ccf64372a (diff)
downloadfluxbox-4304e667870709f29f0fda9e5fbc56cdd81744cc.zip
fluxbox-4304e667870709f29f0fda9e5fbc56cdd81744cc.tar.bz2
catch absurd but possible div-by-zero
-rw-r--r--src/Toolbar.cc2
1 files changed, 1 insertions, 1 deletions
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() {
936 if (relative_items) { 936 if (relative_items) {
937 if (relative_width <= width - fixed_width && stretch_items) { 937 if (relative_width <= width - fixed_width && stretch_items) {
938 relative_width = int(width - fixed_width - relative_width)/stretch_items; 938 relative_width = int(width - fixed_width - relative_width)/stretch_items;
939 } else { 939 } else if (relative_width) {
940 stretch_factor = float(width - fixed_width)/relative_width; 940 stretch_factor = float(width - fixed_width)/relative_width;
941 relative_width = 0; 941 relative_width = 0;
942 } 942 }