From 77812b32e0e2493433618522917d9c77d946b605 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 30 Jun 2016 08:14:48 +0100 Subject: [PATCH] Added handling of potential zero divisor --- src/osgPlugins/txf/TXFFont.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgPlugins/txf/TXFFont.cpp b/src/osgPlugins/txf/TXFFont.cpp index 9cffb40a8..6cd951d02 100644 --- a/src/osgPlugins/txf/TXFFont.cpp +++ b/src/osgPlugins/txf/TXFFont.cpp @@ -221,7 +221,7 @@ TXFFont::loadFont(std::istream& stream) return false; } - float coord_scale = 1.0f/float(computedmaxheight); + float coord_scale = (computedmaxheight>0.0f) ? (1.0f/float(computedmaxheight)) : 1.0f; { // insert a trivial blank character