win32-dont crash when attempting to open file picked as target for CDLogger save stripped rom operation

This commit is contained in:
zeromus 2013-11-12 03:22:40 +00:00
parent d98397ecc1
commit 222816f898
1 changed files with 5 additions and 0 deletions

View File

@ -414,6 +414,11 @@ void SaveStrippedROM(int invert)
if(!GetSaveFileName(&ofn))return;
fp = fopen(sromfilename,"wb");
if(!fp)
{
FCEUD_PrintError("Error opening target stripped rom file!");
return;
}
if(GameInfo->type==GIT_NSF)
{