don't choke on invalid nodes
This commit is contained in:
parent
55903e9a07
commit
43b66ac74b
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue