]> git.mxchange.org Git - flightgear.git/commitdiff
don't choke on invalid nodes
authormfranz <mfranz>
Mon, 5 Jun 2006 21:55:18 +0000 (21:55 +0000)
committermfranz <mfranz>
Mon, 5 Jun 2006 21:55:18 +0000 (21:55 +0000)
src/GUI/new_gui.cxx

index c7790d1d90a098a84093d537efbbddedc5163ff4..6c51dd122288bc2d4ecd3f995fbe399d60f7c886 100644 (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);