Prevent division by zero

Fixes crash reported at
https://marc.info/?l=lyx-users&m=171842978728676
This commit is contained in:
Juergen Spitzmueller 2024-06-15 14:48:37 +02:00
parent 9fff7bdd5a
commit 0fc8ee5ace

View 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;
}