DiscScrubber: fail gracefully on corrupt images

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3272 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman
2009-05-22 07:14:34 +00:00
parent 6a8da15f51
commit 32691cfad7
2 changed files with 74 additions and 52 deletions

View File

@ -169,7 +169,10 @@ bool CompressFileToBlob(const char* infile, const char* outfile, u32 sub_type,
if (sub_type == 1)
{
if (!DiscScrubber::Scrub(infile, callback, arg))
{
PanicAlert("%s failed to be scrubbed. Probably the image is corrupt.", infile);
return false;
}
}
FILE* inf = fopen(infile, "rb");