]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/fl/rowlayoutpl.cpp
Don't divide by zero.
[wxWidgets.git] / contrib / src / fl / rowlayoutpl.cpp
index a1dd955c8ce058609905e0f016c9d4abcf6b1887..92af22e8622c6195ab1239aebfe36f08b9241c31 100644 (file)
@@ -433,6 +433,9 @@ void cbRowLayoutPlugin::ApplyLengthRatios( cbRowInfo* pRow )
     // look like total of mLetRatio's is 1.0, thus original
     // len. ratios are _preserved_:
 
+    if (pcntSum == 0.0)
+        pcntSum = 1.0;
+
     double unit = freeSpc / pcntSum;
 
     bool haveSquished = FALSE;