Explorar o código

Release memory

Johan Mattsson %!s(int64=2) %!d(string=hai) anos
pai
achega
11a9edd263
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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;
    }