X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fsupertux%2Fmain.cpp;h=c853809f841aa64f590f27048520b5d98753013f;hb=3497f1b5834627a6e1aec925410d7dfed470582c;hp=d878c29bc990f254154cd6605ad2cf7a8500fdb8;hpb=b932a363f1df396c0667d9016a6c8b59b3d247d6;p=supertux.git 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);