Fixed memleaks and incorrect add tab in ui::view_group

Signed-off-by: Herman Semenov <GermanAizek@yandex.ru>
This commit is contained in:
Signed-off-by: Henrik Rydgård 2024-04-02 13:48:16 +03:00 committed by Herman Semenov
parent 83bd9fd665
commit 9c3c23daa6
2 changed files with 3 additions and 1 deletions

View File

@ -281,6 +281,7 @@ VFSOpenFile *ZipFileReader::OpenFileForRead(VFSFileReference *vfsReference, size
if (!openFile->zf) {
WARN_LOG(G3D, "File with index %d not found in zip", reference->zi);
lock_.unlock();
delete openFile;
return nullptr;
}

View File

@ -1395,7 +1395,7 @@ void FrameDumpTestScreen::CreateViews() {
LinearLayout *dumps = new LinearLayoutList(ORIENT_VERTICAL);
dumps->SetSpacing(0);
dumpsScroll->Add(dumps);
tabHolder->AddTab("Dumps", dumps);
tabHolder->AddTab("Dumps", dumpsScroll);
dumps->Add(new ItemHeader("GE Frame Dumps"));
@ -1405,6 +1405,7 @@ void FrameDumpTestScreen::CreateViews() {
c->SetTag(url);
c->OnClick.Handle<FrameDumpTestScreen>(this, &FrameDumpTestScreen::OnLoadDump);
}
delete dumpsScroll;
}
UI::EventReturn FrameDumpTestScreen::OnLoadDump(UI::EventParams &params) {