SLUDGE: Plug memory leak

This commit is contained in:
Eugene Sandulenko 2020-04-28 11:56:22 +02:00
parent eba2b4814b
commit 7f149136ca

View File

@ -842,8 +842,10 @@ builtIn(anim) {
// Load the required sprite bank
LoadedSpriteBank *sprBanky = g_sludge->_gfxMan->loadBankForAnim(fileNumber);
if (!sprBanky)
if (!sprBanky) {
delete ba;
return BR_ERROR; // File not found, fatal done already
}
ba->theSprites = sprBanky;
// Return value