Browse Source

Release memory

Johan Mattsson 2 years ago
parent
commit
11a9edd263
1 changed files with 1 additions and 0 deletions
  1. 1 0
      Engine/source/terrain/terrImport.cpp

+ 1 - 0
Engine/source/terrain/terrImport.cpp

@@ -60,6 +60,7 @@ DefineEngineStaticMethod( TerrainBlock, createNew, S32, (String terrainName, U32
    if( !terrain->setFile( terrFileName ) )
    {
       Con::errorf( "TerrainBlock::createNew - error creating '%s'", terrFileName.c_str() );
+      delete terrain;
       return 0;
    }