From: Tobias Markus Date: Mon, 11 Nov 2013 14:51:59 +0000 (+0100) Subject: Fixing compiler errors on Mavericks (not sure if those appeared for everyone) X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=1d8ba99d203868fc5f79e2f0ebb602617caa0de8;p=supertux.git Fixing compiler errors on Mavericks (not sure if those appeared for everyone) --- diff --git a/src/supertux/main.cpp b/src/supertux/main.cpp index d878c29bc..c853809f8 100644 --- a/src/supertux/main.cpp +++ b/src/supertux/main.cpp @@ -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);