OS/2 crash prevention, make sure that a division by zero can not occure, bug 221975, r/sr=bzbarsky

git-svn-id: svn://10.0.0.236/trunk@149254 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bmlk%gmx.de
2003-11-13 17:34:46 +00:00
parent a6b5f9263c
commit 557ab433ca
2 changed files with 8 additions and 0 deletions

View File

@@ -490,6 +490,10 @@ void BasicTableLayoutStrategy::AllocateUnconstrained(PRInt32 aAllocAmount,
numColsAllocated++;
}
}
if (!numColsAllocated) {
// redistribute the space to all columns and prevent a division by zero
numColsAllocated = numCols;
}
for (colX = 0; colX < numCols; colX++) {
if (FINISHED != aAllocTypes[colX]) {
if (aExclude0Pro) {