Mercurial > hg > svgui
comparison view/PaneStack.cpp @ 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 | d6976d231efb |
children | 911330a28a7c |
comparison
equal
deleted
inserted
replaced
1613:fe9a643b83bf | 1614:c6f5c822b10d |
---|---|
251 PaneStack::adjustAlignmentViewHeights(int forMyHeight) | 251 PaneStack::adjustAlignmentViewHeights(int forMyHeight) |
252 { | 252 { |
253 if (!(m_options & int(Option::ShowAlignmentViews))) return; | 253 if (!(m_options & int(Option::ShowAlignmentViews))) return; |
254 if (!(m_options & int(Option::NoUserResize))) return; | 254 if (!(m_options & int(Option::NoUserResize))) return; |
255 if (!isVisible()) return; | 255 if (!isVisible()) return; |
256 if (m_panes.empty()) return; | |
256 | 257 |
257 int heightPerPane = forMyHeight / int(m_panes.size()); | 258 int heightPerPane = forMyHeight / int(m_panes.size()); |
258 | 259 |
259 SVCERR << "heightPerPane = " << heightPerPane << " (" | 260 SVCERR << "heightPerPane = " << heightPerPane << " (" |
260 << forMyHeight << "/" << m_panes.size() << ")" << endl; | 261 << forMyHeight << "/" << m_panes.size() << ")" << endl; |