If a screen has no BG, we create a blank Actor without looking at g_vPreparedBackgrounds.

Don't put them on there when we're done; they'll never be reused.
This commit is contained in:
Glenn Maynard
2005-10-25 12:42:32 +00:00
parent f56df35f86
commit f413d3e412
+6 -2
View File
@@ -674,8 +674,12 @@ void ScreenManager::LoadDelayedScreen()
}
ASSERT( pNewBGA != NULL );
/* Move the background back to the prepared list. */
g_vPreparedBackgrounds.push_back( g_pSharedBGA );
/* Move the old background back to the prepared list, or delete it if
* it's a blank actor. */
if( g_pSharedBGA->GetName() == "" )
delete g_pSharedBGA;
else
g_vPreparedBackgrounds.push_back( g_pSharedBGA );
g_pSharedBGA = pNewBGA;
g_pSharedBGA->PlayCommand( "On" );
}