1
0
Fork 0

don't choke on invalid nodes

This commit is contained in:
mfranz 2006-06-05 21:55:18 +00:00
parent 55903e9a07
commit 43b66ac74b

View file

@ -457,6 +457,9 @@ FGFontCache::get(const char *name, float size, float slant)
puFont *
FGFontCache::get(SGPropertyNode *node)
{
if (!node)
return get("Helvetica.txf", 15.0, 0.0);
const char *name = node->getStringValue("name", "Helvetica.txf");
float size = node->getFloatValue("size", 15.0);
float slant = node->getFloatValue("slant", 0.0);