]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/dialog.cxx
puList.cxx: _list_box->getIntegerValue() returns -1 as long as no list
[flightgear.git] / src / GUI / dialog.cxx
index 6d9dafe19a742a2237fc1855f40fe22e52c5a76e..d09d572e98168a6b1fcbce6b5e9e391fb49a1ce9 100644 (file)
@@ -304,7 +304,9 @@ copy_from_pui (puObject * object, SGPropertyNode * node)
         // Special case to handle lists, as getStringValue cannot be overridden
         if(object->getType() & PUCLASS_LIST)
         {
-            node->setStringValue(((puList *) object)->getListStringValue());
+            const char *s = ((puList *) object)->getListStringValue();
+            if (s)
+                node->setStringValue(s);
         }
         else
         {