]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/util.cxx
Support a log-list widget in PUI.
[flightgear.git] / src / Main / util.cxx
index 9b5b3da8b148076cb969b2755dc6d8b8d71037ba..8efbb93fac80517ddf268d78175a1b4977f781fc 100644 (file)
@@ -129,16 +129,15 @@ fgUnescape (const char *s)
 // or an empty string otherwise.
 const char *fgValidatePath (const char *str, bool write)
 {
-    static SGPropertyNode_ptr r, w;
-    if (!r) {
-        r = fgGetNode("/sim/paths/validate/read", true);
-        r->setAttribute(SGPropertyNode::READ, true);
-        r->setAttribute(SGPropertyNode::WRITE, true);
-
-        w = fgGetNode("/sim/paths/validate/write", true);
-        w->setAttribute(SGPropertyNode::READ, true);
-        w->setAttribute(SGPropertyNode::WRITE, true);
-    }
+    SGPropertyNode_ptr r, w;
+    r = fgGetNode("/sim/paths/validate/read", true);
+    r->setAttribute(SGPropertyNode::READ, true);
+    r->setAttribute(SGPropertyNode::WRITE, true);
+
+    w = fgGetNode("/sim/paths/validate/write", true);
+    w->setAttribute(SGPropertyNode::READ, true);
+    w->setAttribute(SGPropertyNode::WRITE, true);
+
     SGPropertyNode *prop = write ? w : r;
     prop->setStringValue(str);
     const char *result = prop->getStringValue();