From 222816f8980e272142b9f0a41e45c51ce113656d Mon Sep 17 00:00:00 2001 From: zeromus Date: Tue, 12 Nov 2013 03:22:40 +0000 Subject: [PATCH] win32-dont crash when attempting to open file picked as target for CDLogger save stripped rom operation --- trunk/src/drivers/win/cdlogger.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/trunk/src/drivers/win/cdlogger.cpp b/trunk/src/drivers/win/cdlogger.cpp index 7c64ed9a..cff4a75e 100644 --- a/trunk/src/drivers/win/cdlogger.cpp +++ b/trunk/src/drivers/win/cdlogger.cpp @@ -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) {