]> git.lyx.org Git - features.git/commitdiff
Omit floating point exception
authorKornel Benko <kornel@lyx.org>
Fri, 31 May 2019 10:55:12 +0000 (12:55 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:31 +0000 (15:48 +0200)
src/insets/InsetTabular.cpp

index c70207419126a5facc4388f4a2aa875c4ed3aae3..dec2961dd16c37617a44150aa4872f377d43b981 100644 (file)
@@ -1107,7 +1107,7 @@ bool Tabular::updateColumnWidths(MetricsInfo & mi)
        // (minus the fixed widths) to the variable-width columns
        int vcolwidth = -1;
        int restcols = ncols() - max_pwidth.size();
-       if (restwidth > 0)
+       if ((restwidth > 0) && (restcols != 0))
                vcolwidth = restwidth / restcols;
 
        // Now consider that some variable width columns exceed the vcolwidth