fixed map loading for maps with no TERRAIN section (trees)

git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1282 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
bob
2007-07-16 00:59:11 +00:00
parent a93426a77f
commit 74fb71b253

View File

@@ -120,6 +120,9 @@ namespace OpenRa.FileFormats
void ReadTrees( IniFile file )
{
IniSection terrain = file.GetSection( "TERRAIN" );
if( terrain == null )
return;
foreach( KeyValuePair<string, string> kv in terrain )
Trees.Add( new TreeReference( int.Parse( kv.Key ), kv.Value ) );
}