summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTillmann Karras <tilkax@gmail.com>2026-06-13 17:38:26 +0100
committerTillmann Karras <tilkax@gmail.com>2026-06-13 17:39:08 +0100
commit37a3b0fe6a48d74cf24f8234c84b613120348504 (patch)
treeb1a3aaa2113d4b5abbe1dce820f546f326f52eb4
parent1bc93fd16d5a452bedcc5437923abd0d9fcb8c52 (diff)
DolphinTool: fix crash when listing partition without filesystem
We were also passing the wrong partition name.
-rw-r--r--Source/Core/DolphinTool/ExtractCommand.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/Core/DolphinTool/ExtractCommand.cpp b/Source/Core/DolphinTool/ExtractCommand.cpp
index e1803a7242..57106d6406 100644
--- a/Source/Core/DolphinTool/ExtractCommand.cpp
+++ b/Source/Core/DolphinTool/ExtractCommand.cpp
@@ -119,6 +119,11 @@ static bool ListPartition(const DiscIO::Volume& disc_volume, const DiscIO::Parti
std::string* result_text)
{
const DiscIO::FileSystem* filesystem = disc_volume.GetFileSystem(partition);
+ if (!filesystem)
+ {
+ fmt::println(std::cerr, "Warning: partition {} has no filesystem.", partition_name);
+ return false;
+ }
const std::unique_ptr<DiscIO::FileInfo> info = filesystem->FindFileInfo(path);
if (!info)
@@ -167,7 +172,7 @@ static bool ListVolume(const DiscIO::Volume& disc_volume, const std::string& pat
fmt::print(std::cout, "{}", partition_start);
result_text->append(partition_start);
- success |= ListPartition(disc_volume, p, specific_partition_name, path, result_text);
+ success |= ListPartition(disc_volume, p, partition_name, path, result_text);
}
return success;