diff --git a/src/gui/partwidgetbase.cpp b/src/gui/partwidgetbase.cpp index 8fe7244..05f5814 100644 --- a/src/gui/partwidgetbase.cpp +++ b/src/gui/partwidgetbase.cpp @@ -110,6 +110,9 @@ void PartWidgetBase::positionChildren(const QWidget* destWidget, const Partition foreach(const Partition * p, partitions) totalLength += p->length(); + if (totalLength < 1) + return; + // calculate unleveled width for each child and store it for (int i = 0; i < partitions.size(); i++) { childrenWidth.append(partitions[i]->length() * destWidgetWidth / totalLength);