]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/prop_picker.cxx
Some follow up patches from Norman Vine.
[flightgear.git] / src / GUI / prop_picker.cxx
index 86ce0d7343793cdfe598d9f4d9a004c29dcb295a..e38342fd74aaca393949777a0da3996d5c728d89 100755 (executable)
@@ -479,9 +479,12 @@ void fgPropPicker::find_props ()
                dflag[ pi ] = 1 ;
                 files[ pi ] = new char[ strlen(line.c_str())+strlen(sindex)+4 ] ;
                strcpy ( files [ pi ], line.c_str() ) ;
-               strcat ( files [ pi ], "[" ) ;
-                strcat ( files [ pi ], sindex ) ;
-               strcat ( files [ pi ], "]/" ) ;
+               if ( node->getChild(name, 1) != 0 ) {
+                   strcat ( files [ pi ], "[" ) ;
+                    strcat ( files [ pi ], sindex ) ;
+                   strcat ( files [ pi ], "]" ) ;
+               }
+               strcat ( files [ pi ], "/" ) ;
                values[ pi ] = new char[ 2 ] ;
            } else {
                 dflag[ pi ] = 0 ;