mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-15 15:30:29 +02:00
Minor cleanup. Fix file handle leak when opening zip files from the main screen.
This commit is contained in:
1 parent
0dec3526a5
commit
605daf879b
5 files changed
+25
-8
No files matched your search
+2
-3
@@ -77,14 +77,13 @@ bool MainScreen::showHomebrewTab = false;
|
||||
|
||||
bool LaunchFile(ScreenManager *screenManager, const Path &path) {
|
||||
// Depending on the file type, we don't want to launch EmuScreen at all.
|
||||
auto loader = ConstructFileLoader(path);
|
||||
std::unique_ptr<FileLoader> loader(ConstructFileLoader(path));
|
||||
if (!loader) {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string errorString;
|
||||
IdentifiedFileType type = Identify_File(loader, &errorString);
|
||||
delete loader;
|
||||
IdentifiedFileType type = Identify_File(loader.get(), &errorString);
|
||||
|
||||
switch (type) {
|
||||
case IdentifiedFileType::ARCHIVE_ZIP:
|
||||
|
||||
Reference in new issue
Block a user