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:
JosJuice 2017-06-09 17:44:43 +02:00
parent 9885a2bb28
commit fdd197475b
1 changed files with 3 additions and 0 deletions

View File

@ -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;