diff --git a/OpenRa.FileFormats/Map.cs b/OpenRa.FileFormats/Map.cs index 6c957274dc..4776132f25 100644 --- a/OpenRa.FileFormats/Map.cs +++ b/OpenRa.FileFormats/Map.cs @@ -120,6 +120,9 @@ namespace OpenRa.FileFormats void ReadTrees( IniFile file ) { IniSection terrain = file.GetSection( "TERRAIN" ); + if( terrain == null ) + return; + foreach( KeyValuePair kv in terrain ) Trees.Add( new TreeReference( int.Parse( kv.Key ), kv.Value ) ); }