From 3b3120c04d943329ee2bd8061e806f7f6e68069b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sun, 6 Jul 2014 22:14:20 -0700 Subject: [PATCH] Cleanup. --- examples/common/entry/entry_ios.mm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/examples/common/entry/entry_ios.mm b/examples/common/entry/entry_ios.mm index 9a318e9f..e35c7ef2 100644 --- a/examples/common/entry/entry_ios.mm +++ b/examples/common/entry/entry_ios.mm @@ -57,12 +57,14 @@ namespace entry int32_t MainThreadEntry::threadFunc(void* _userData) { - CFBundleRef mainBundle = CFBundleGetMainBundle(); - CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle); - char path[PATH_MAX]; - if (CFURLGetFileSystemRepresentation(resourcesURL, TRUE, (UInt8 *)path, PATH_MAX)) - chdir(path); - CFRelease(resourcesURL); + CFBundleRef mainBundle = CFBundleGetMainBundle(); + CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle); + char path[PATH_MAX]; + if (CFURLGetFileSystemRepresentation(resourcesURL, TRUE, (UInt8 *)path, PATH_MAX) ) + { + chdir(path); + } + CFRelease(resourcesURL); MainThreadEntry* self = (MainThreadEntry*)_userData; int32_t result = main(self->m_argc, self->m_argv);