summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-07-20 21:26:09 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-07-20 21:26:09 +0000
commit5ddc3b2286806068bbf63e048a177a121eaa99b5 (patch)
tree5dfed7d5446315312f05ce24955e38a9073b2c7d
parent997d0637fd9d5d98d5f97135471cfbf4137698a5 (diff)
downloadpcsxr-5ddc3b2286806068bbf63e048a177a121eaa99b5.tar.gz
Fix debug messages when the debug file pointer isn't inited on OS X. This only affects the Debug build.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@86181 e17a0e51-4ae3-4d35-97c3-1a29b211df97
-rwxr-xr-xmacosx/main.m9
1 files changed, 6 insertions, 3 deletions
diff --git a/macosx/main.m b/macosx/main.m
index 2627f6d3..79949694 100755
--- a/macosx/main.m
+++ b/macosx/main.m
@@ -135,8 +135,8 @@ void SysPrintf(const char *fmt, ...) {
if (Config.PsxOut) NSLog (@"%s", msg);
#ifdef EMU_LOG
#ifndef LOG_STDOUT
- fprintf(emuLog, "%s %s: %s",[[debugDateFormatter() stringFromDate:[NSDate date]] UTF8String],
- [[[NSBundle mainBundle]objectForInfoDictionaryKey:@"CFBundleName"] UTF8String], msg);
+ if (emuLog) fprintf(emuLog, "%s %s: %s",[[debugDateFormatter() stringFromDate:[NSDate date]] UTF8String],
+ [[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"] UTF8String], msg);
#endif
#endif
};
@@ -231,7 +231,10 @@ void SysClose() {
powerAssertion = kIOPMNullAssertionID;
}
- if (emuLog != NULL) fclose(emuLog);
+ if (emuLog != NULL) {
+ fclose(emuLog);
+ emuLog = NULL;
+ }
sysInited = NO;
detachHotkeys();