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:
1 parent
9885a2bb28
commit
fdd197475b
1 file changed
+3
@@ -343,6 +343,9 @@ bool CBoot::EmulatedBS2_Wii(const DiscIO::Volume* volume)
|
||||
const DiscIO::Partition partition = volume->GetGamePartition();
|
||||
const IOS::ES::TMDReader tmd = volume->GetTMD(partition);
|
||||
|
||||
if (!tmd.IsValid())
|
||||
return false;
|
||||
|
||||
if (!SetupWiiMemory(volume, tmd.GetIOSId()))
|
||||
return false;
|
||||
|
||||
|
||||
Reference in new issue
Block a user