changeset 1614:c6f5c822b10d

Fix potential divide-by-zero (depending on a race elsewhere)
author Chris Cannam
date Tue, 30 Jun 2020 10:56:56 +0100
parents fe9a643b83bf
children 911330a28a7c
files view/PaneStack.cpp
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/view/PaneStack.cpp	Thu Jun 18 13:45:11 2020 +0100
+++ b/view/PaneStack.cpp	Tue Jun 30 10:56:56 2020 +0100
@@ -253,6 +253,7 @@
     if (!(m_options & int(Option::ShowAlignmentViews))) return;
     if (!(m_options & int(Option::NoUserResize))) return;
     if (!isVisible()) return;
+    if (m_panes.empty()) return;
 
     int heightPerPane = forMyHeight / int(m_panes.size());