Enable docking clearance for non-debug Mac builds (oops). Fixed a potential crash when calling JS player.ship.setGalacticHyperspaceBehaviour() with an invalid argument.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1829 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Jens Ayton 2008-11-03 21:48:41 +00:00
parent bbd9c0ef23
commit c5af9b124b
2 changed files with 7 additions and 1 deletions

View File

@ -3421,6 +3421,7 @@
GCC_OPTIMIZATION_LEVEL = s;
GCC_PREPROCESSOR_DEFINITIONS = XP_UNIX;
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = (
DOCKING_CLEARANCE_ENABLED,
NDEBUG,
OO_EXCLUDE_DEBUG_SUPPORT,
);
@ -3538,7 +3539,10 @@
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_OPTIMIZATION_LEVEL = s;
GCC_PREPROCESSOR_DEFINITIONS = XP_UNIX;
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "OO_SMART_CRASH_REPORT_INSTALL=1";
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = (
DOCKING_CLEARANCE_ENABLED,
"OO_SMART_CRASH_REPORT_INSTALL=1",
);
GCC_REUSE_STRINGS = YES;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
@ -3654,6 +3658,7 @@
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = XP_UNIX;
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = (
DOCKING_CLEARANCE_ENABLED,
OO_DEBUG,
DEBUG_GRAPHVIZ,
DEBUG,

View File

@ -579,6 +579,7 @@ static JSBool PlayerShipSetGalacticHyperspaceBehaviour(JSContext *context, JSObj
if (behaviour == GALACTIC_HYPERSPACE_BEHAVIOUR_UNKNOWN)
{
OOReportJSErrorForCaller(context, @"PlayerShip", @"setGalacticHyperspaceBehaviour", @"Unknown galactic hyperspace behaviour name %@.", behavString);
return NO;
}
[player setGalacticHyperspaceBehaviour:behaviour];