projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e9746a6
)
Fixing compiler errors on Mavericks (not sure if those appeared for everyone)
author
Tobias Markus
<tobbi@mozilla-uk.org>
Mon, 11 Nov 2013 14:51:59 +0000
(15:51 +0100)
committer
Tobias Markus
<tobiasmarkus1@tobiass-mbp.fritz.box>
Fri, 24 Jan 2014 21:56:53 +0000
(22:56 +0100)
src/supertux/main.cpp
patch
|
blob
|
history
diff --git
a/src/supertux/main.cpp
b/src/supertux/main.cpp
index
07a3da3
..
87d5389
100644
(file)
--- 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();
// 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);
CFURLRef mainBundleURL = CFBundleCopyBundleURL(mainBundle);
- assert(mainBundleURL != 0);
+ if(mainBundleURL == 0)
+ throw "Assertion failed: mainBundleURL != 0";
CFStringRef pathStr = CFURLCopyFileSystemPath(mainBundleURL, kCFURLPOSIXPathStyle);
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);
CFStringGetCString(pathStr, path, PATH_MAX, kCFStringEncodingUTF8);
CFRelease(mainBundleURL);
CFRelease(pathStr);