From: mfranz Date: Mon, 5 Jun 2006 21:55:18 +0000 (+0000) Subject: don't choke on invalid nodes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=43b66ac74b8402ad7289f429fdfbbe7779e0dcdd;p=flightgear.git don't choke on invalid nodes --- 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);