X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fsupertux%2Fmain.cpp;h=87d538980a968e08c1c935c9c19dbf2b2c759324;hb=ba728638b516317b0a458bd43c282212f56f0fa3;hp=07a3da3eb272856640cc64fb1914e2a50e6fd5fe;hpb=e9746a69d7ba51c8625242112fbaf955eda21998;p=supertux.git diff --git a/src/supertux/main.cpp b/src/supertux/main.cpp index 07a3da3eb..87d538980 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);