# HG changeset patch # User Chris Cannam # Date 1593511016 -3600 # Node ID c6f5c822b10de029784b1a6cf0b9adc7c2e3af3a # Parent fe9a643b83bfc434b47c41e1c4281ab99ff05947 Fix potential divide-by-zero (depending on a race elsewhere) diff -r fe9a643b83bf -r c6f5c822b10d view/PaneStack.cpp --- 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());