Fixes #166 - Segfault when passed a non-existent bundle #166

This commit is contained in:
Shazron Abdullah 2015-10-06 14:00:42 -07:00
parent 16f52589db
commit 75820a0979

View File

@ -218,7 +218,7 @@ void on_sys_error(NSString* format, ...) {
NSString* str = [[[NSString alloc] initWithFormat:format arguments:valist] autorelease]; NSString* str = [[[NSString alloc] initWithFormat:format arguments:valist] autorelease];
va_end(valist); va_end(valist);
on_error(@"%@ : %@", str, errstr); on_error(@"%@ : %@", str, [NSString stringWithUTF8String:errstr]);
} }
void NSLogOut(NSString* format, ...) { void NSLogOut(NSString* format, ...) {
@ -1934,7 +1934,7 @@ int main(int argc, char *argv[]) {
if (app_path) { if (app_path) {
if (access(app_path, F_OK) != 0) { if (access(app_path, F_OK) != 0) {
on_sys_error(@"Can't access app path '%@'", app_path); on_sys_error(@"Can't access app path '%@'", [NSString stringWithUTF8String:app_path]);
} }
} }