mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Boot: Check TMD validity before reading from TMD
Otherwise Dolphin crashes when trying to boot a Wii game with an invalid TMD.
This commit is contained in:
@ -343,6 +343,9 @@ bool CBoot::EmulatedBS2_Wii(const DiscIO::Volume* volume)
|
|||||||
const DiscIO::Partition partition = volume->GetGamePartition();
|
const DiscIO::Partition partition = volume->GetGamePartition();
|
||||||
const IOS::ES::TMDReader tmd = volume->GetTMD(partition);
|
const IOS::ES::TMDReader tmd = volume->GetTMD(partition);
|
||||||
|
|
||||||
|
if (!tmd.IsValid())
|
||||||
|
return false;
|
||||||
|
|
||||||
if (!SetupWiiMemory(volume, tmd.GetIOSId()))
|
if (!SetupWiiMemory(volume, tmd.GetIOSId()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user