Skip to content

Commit 9c3c23d

Browse files
hrydgardGermanAizek
authored andcommittedApr 2, 2024·
Fixed memleaks and incorrect add tab in ui::view_group
Signed-off-by: Herman Semenov <GermanAizek@yandex.ru>
1 parent 83bd9fd commit 9c3c23d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
 

‎Common/File/VFS/ZipFileReader.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ VFSOpenFile *ZipFileReader::OpenFileForRead(VFSFileReference *vfsReference, size
281281
if (!openFile->zf) {
282282
WARN_LOG(G3D, "File with index %d not found in zip", reference->zi);
283283
lock_.unlock();
284+
delete openFile;
284285
return nullptr;
285286
}
286287

‎UI/DevScreens.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1395,7 +1395,7 @@ void FrameDumpTestScreen::CreateViews() {
13951395
LinearLayout *dumps = new LinearLayoutList(ORIENT_VERTICAL);
13961396
dumps->SetSpacing(0);
13971397
dumpsScroll->Add(dumps);
1398-
tabHolder->AddTab("Dumps", dumps);
1398+
tabHolder->AddTab("Dumps", dumpsScroll);
13991399

14001400
dumps->Add(new ItemHeader("GE Frame Dumps"));
14011401

@@ -1405,6 +1405,7 @@ void FrameDumpTestScreen::CreateViews() {
14051405
c->SetTag(url);
14061406
c->OnClick.Handle<FrameDumpTestScreen>(this, &FrameDumpTestScreen::OnLoadDump);
14071407
}
1408+
delete dumpsScroll;
14081409
}
14091410

14101411
UI::EventReturn FrameDumpTestScreen::OnLoadDump(UI::EventParams &params) {

0 commit comments

Comments
 (0)
Please sign in to comment.