[LyX/master] Prevent division by zero
Juergen Spitzmueller
spitz at lyx.org
Sat Jun 15 12:50:04 UTC 2024
commit 0fc8ee5ace22c11175cb93f5b6f7310cc4d646c1
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Sat Jun 15 14:48:37 2024 +0200
Prevent division by zero
Fixes crash reported at
https://marc.info/?l=lyx-users&m=171842978728676
---
src/insets/InsetTabular.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index 1f7cc33ba4..7fddfab7c3 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;
}
More information about the lyx-cvs
mailing list