fix(color): Memory leak when disconnecting USB in SD card mode (#3453)

This commit is contained in:
philmoz
2023-04-15 18:41:35 +10:00
committed by GitHub
parent bb83780367
commit e03add0b86
@@ -156,7 +156,7 @@ class Theme480: public OpenTxTheme
void setBackgroundImageFileName(const char *fileName) override
{
// ensure you delete old bitmap
if (strcmp(backgroundImageFileName, fileName) != 0 && backgroundBitmap != nullptr)
if (backgroundBitmap != nullptr)
delete backgroundBitmap;
OpenTxTheme::setBackgroundImageFileName(fileName); // set the filename
backgroundBitmap = BitmapBuffer::loadBitmap(backgroundImageFileName);