mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 13:49:53 -06:00
Fix a crash that got recently introduced.
When CFileSystemGCWii::GetFileName can't find a valid filename it would return nullptr. nullptr as a std::string throws an assert within the std lib. So return an empty string and check if it is empty or not
This commit is contained in:
@ -143,6 +143,9 @@ void FindFilename(u64 offset)
|
||||
}
|
||||
|
||||
const std::string filename = pFileSystem->GetFileName(offset);
|
||||
|
||||
if (filename.empty())
|
||||
return;
|
||||
|
||||
CheckFile(filename, pFileSystem->GetFileSize(filename));
|
||||
}
|
||||
|
Reference in New Issue
Block a user