From: Juergen Spitzmueller Date: Sat, 15 Jun 2024 12:48:37 +0000 (+0200) Subject: Prevent division by zero X-Git-Tag: 2.4.1~34 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=6b3782e07b445585a5ed2efbc0589aa638178134;p=lyx.git Prevent division by zero Fixes crash reported at https://marc.info/?l=lyx-users&m=171842978728676 (cherry picked from commit 0fc8ee5ace22c11175cb93f5b6f7310cc4d646c1) --- diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 31aac87dc9..5a67154ee0 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -1330,7 +1330,7 @@ bool Tabular::updateColumnWidths(MetricsInfo & mi) changed = true; } } - if (changed && restwidth > 0) + if (changed && restwidth > 0 && restcols != 0) vcolwidth = restwidth / restcols; } diff --git a/status.24x b/status.24x index 54dd480d50..54619fe8ff 100644 --- a/status.24x +++ b/status.24x @@ -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