]> git.lyx.org Git - lyx.git/commitdiff
Prevent division by zero
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 15 Jun 2024 12:48:37 +0000 (14:48 +0200)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Sat, 15 Jun 2024 16:05:48 +0000 (12:05 -0400)
Fixes crash reported at
https://marc.info/?l=lyx-users&m=171842978728676

(cherry picked from commit 0fc8ee5ace22c11175cb93f5b6f7310cc4d646c1)

src/insets/InsetTabular.cpp
status.24x

index 31aac87dc909fc389ab36f6e0dfb3d59e2a943a0..5a67154ee0c86c01ff706c59d9d1045389f786a1 100644 (file)
@@ -1330,7 +1330,7 @@ bool Tabular::updateColumnWidths(MetricsInfo & mi)
                                changed = true;
                        }
                }
-               if (changed && restwidth > 0)
+               if (changed && restwidth > 0 && restcols != 0)
                        vcolwidth = restwidth / restcols;
        }
 
index 54dd480d50e4afcce32724ec5efb7446fe78c891..54619fe8ff49f7cc9165066306bef0834cd16a78 100644 (file)
@@ -41,6 +41,8 @@ What's new
 - The performance of LyX with large insets on slower computers has
   been improved a lot (bug 12297).
 
+- Fix crash with multirow tables.
+
 
 * DOCUMENTATION AND LOCALIZATION