Projectkk2glider/issue 4099 leaks (#4617)
* Re #4099: memory leaks on model select screen fixed [Horus] * Re #4099: memory leak in wizard background image [Horus]
This commit is contained in:
committed by
Bertrand Songis
parent
0020941740
commit
b965cac481
@@ -125,6 +125,7 @@ uint8_t getWizardCount()
|
||||
}
|
||||
}
|
||||
}
|
||||
f_closedir(&dir);
|
||||
return wizCnt;
|
||||
}
|
||||
|
||||
@@ -192,7 +193,8 @@ bool menuModelWizard(event_t event)
|
||||
strcpy(&wizpath[sizeof(WIZARD_PATH)], fno.fname);
|
||||
strcpy(&wizpath[sizeof(WIZARD_PATH) + strlen(fno.fname)], "/icon.png");
|
||||
lcdDrawText(x + 10, WIZARD_TEXT_Y, fno.fname);
|
||||
lcd->drawBitmap(x, WIZARD_ICON_Y, BitmapBuffer::load(wizpath));
|
||||
BitmapBuffer * background = BitmapBuffer::load(wizpath);
|
||||
lcd->drawBitmap(x, WIZARD_ICON_Y, background);
|
||||
if(wizidx == wizardSelected ) {
|
||||
if (wizardSelected < 5) {
|
||||
lcdDrawRect(x, WIZARD_ICON_Y, 85, 130, 2, SOLID, MAINVIEW_GRAPHICS_COLOR_INDEX);
|
||||
@@ -207,6 +209,7 @@ bool menuModelWizard(event_t event)
|
||||
}
|
||||
}
|
||||
}
|
||||
delete background;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user