GRAPHICS: Correct cleanup loop on BDF load failure

Identified by xcode analysis, the cleanup code would have crashed before as it
was using the wrong loop variable.
This commit is contained in:
Matthew Duggan 2023-12-09 21:35:52 +11:00
parent e9e89f0a70
commit 0b4aa788ff

View File

@ -679,7 +679,7 @@ BdfFont *BdfFont::loadFromCache(Common::SeekableReadStream &stream) {
if (stream.err() || stream.eos()) {
for (int j = 0; j < i; ++j)
delete[] bitmaps[i];
delete[] bitmaps[j];
delete[] bitmaps;
return nullptr;
}