Skip to content

Commit

Permalink
Fixing compiler errors on Mavericks (not sure if those appeared for e…
Browse files Browse the repository at this point in the history
…veryone)
  • Loading branch information
tobbi committed Nov 11, 2013
1 parent 0badb91 commit 1d8ba99
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/supertux/main.cpp
Expand Up @@ -171,11 +171,14 @@ Main::init_physfs(const char* argv0)
// when started from Application file on Mac OS X...
char path[PATH_MAX];
CFBundleRef mainBundle = CFBundleGetMainBundle();
assert(mainBundle != 0);
if(mainBundle == 0)
throw "Assertion failed: mainBundle != 0";
CFURLRef mainBundleURL = CFBundleCopyBundleURL(mainBundle);
assert(mainBundleURL != 0);
if(mainBundleURL == 0)
throw "Assertion failed: mainBundleURL != 0";
CFStringRef pathStr = CFURLCopyFileSystemPath(mainBundleURL, kCFURLPOSIXPathStyle);
assert(pathStr != 0);
if(pathStr == 0)
throw "Assertion failed: pathStr != 0";
CFStringGetCString(pathStr, path, PATH_MAX, kCFStringEncodingUTF8);
CFRelease(mainBundleURL);
CFRelease(pathStr);
Expand Down

0 comments on commit 1d8ba99

Please sign in to comment.