mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Fixup dd79338c
: avoid hypothetical division by zero
Spotted by Coverity.
This commit is contained in:
parent
c76b8b3a25
commit
d1d3f75548
@ -220,7 +220,7 @@ public:
|
||||
}
|
||||
// The longest line in the reference font (for English)
|
||||
// is 180. Calculate scale factor from that.
|
||||
double const wscale = (180.0 / wline);
|
||||
double const wscale = wline > 0 ? (180.0 / wline) : 1;
|
||||
// Now do the same for the height (necessary for condensed fonts)
|
||||
double const hscale = (34.0 / hline);
|
||||
// take the lower of the two scale factors.
|
||||
|
Loading…
Reference in New Issue
Block a user