From 43b66ac74b8402ad7289f429fdfbbe7779e0dcdd Mon Sep 17 00:00:00 2001 From: mfranz Date: Mon, 5 Jun 2006 21:55:18 +0000 Subject: [PATCH] don't choke on invalid nodes --- src/GUI/new_gui.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/GUI/new_gui.cxx b/src/GUI/new_gui.cxx index c7790d1d9..6c51dd122 100644 --- a/src/GUI/new_gui.cxx +++ b/src/GUI/new_gui.cxx @@ -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); -- 2.39.5