PadNull: safer fclose

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3690 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut@gmail.com 2010-08-25 20:18:45 +00:00
parent 70cd51a64b
commit 28dc7cfe69
1 changed files with 5 additions and 2 deletions

View File

@ -102,7 +102,10 @@ EXPORT_C_(void) PADsetLogDir(const char* dir)
s_strLogPath = (dir==NULL) ? "logs/" : dir; s_strLogPath = (dir==NULL) ? "logs/" : dir;
// Reload the log file after updated the path // Reload the log file after updated the path
if (padLog) fclose(padLog); if (padLog) {
fclose(padLog);
padLog = NULL;
}
OpenLog(); OpenLog();
} }
@ -118,7 +121,7 @@ EXPORT_C_(s32) PADinit(u32 flags)
EXPORT_C_(void) PADshutdown() EXPORT_C_(void) PADshutdown()
{ {
#ifdef PAD_LOG #ifdef PAD_LOG
if (padLog != NULL) if (padLog)
{ {
fclose(padLog); fclose(padLog);
padLog = NULL; padLog = NULL;