Fix possible division by zero in edge cases

* Reported by Coverity Scan
This commit is contained in:
baldurk
2017-11-22 12:05:59 +00:00
parent 7ec2c79e86
commit 25ea14c965
4 changed files with 14 additions and 5 deletions
+1 -1
View File
@@ -364,7 +364,7 @@ void RDHeaderView::cacheSectionMinSizes()
void RDHeaderView::resizeSectionsWithHints()
{
if(m_sectionMinSizes.count() == 0)
if(m_sectionMinSizes.count() == 0 || m_sectionStretchHintTotal <= 0)
return;
QVector<int> sizes = m_sectionMinSizes;