diff --git a/sp/src/game/client/c_sceneentity.cpp b/sp/src/game/client/c_sceneentity.cpp index 1b15faf4..f4c66cc7 100644 --- a/sp/src/game/client/c_sceneentity.cpp +++ b/sp/src/game/client/c_sceneentity.cpp @@ -823,10 +823,10 @@ CChoreoScene *C_SceneEntity::LoadScene( const char *filename ) if ( bufsize > 0 ) { // Definitely in scenes.image - pBuffer = new char[ bufsize ]; + pBuffer = malloc( bufsize ); if ( !scenefilecache->GetSceneData( filename, (byte *)pBuffer, bufsize ) ) { - delete[] pBuffer; + free( pBuffer ); return NULL; } @@ -866,10 +866,10 @@ CChoreoScene *C_SceneEntity::LoadScene( const char *filename ) if ( bufsize <= 0 ) return NULL; - pBuffer = new char[ bufsize ]; + pBuffer = malloc( bufsize ); if ( !scenefilecache->GetSceneData( filename, (byte *)pBuffer, bufsize ) ) { - delete[] pBuffer; + free( pBuffer ); return NULL; } @@ -897,7 +897,7 @@ CChoreoScene *C_SceneEntity::LoadScene( const char *filename ) } #endif - delete[] pBuffer; + free( pBuffer ); return pScene; } @@ -1261,4 +1261,4 @@ void C_SceneEntity::PrefetchAnimBlocks( CChoreoScene *pScene ) return; Msg( "%d of %d animations resident\n", nResident, nChecked ); -} \ No newline at end of file +}