Fixed potentially invalid (unchecked) cast of non-object jsval to object in JS timer construction (bug 17149).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3325 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
0ad38f3e60
commit
51e49ae7fb
@ -926,6 +926,12 @@ static int baseVertexIndexForEdge(int va, int vb, BOOL textured);
|
|||||||
|
|
||||||
if (EXPECT_NOT(textureName == 0)) [self reifyTexture];
|
if (EXPECT_NOT(textureName == 0)) [self reifyTexture];
|
||||||
|
|
||||||
|
if (gDebugFlags & DEBUG_MISC)
|
||||||
|
{
|
||||||
|
LogOpenGLState();
|
||||||
|
gDebugFlags &= ~DEBUG_MISC;
|
||||||
|
}
|
||||||
|
|
||||||
switch (planet_type)
|
switch (planet_type)
|
||||||
{
|
{
|
||||||
case STELLAR_TYPE_ATMOSPHERE:
|
case STELLAR_TYPE_ATMOSPHERE:
|
||||||
|
@ -35,6 +35,7 @@ MA 02110-1301, USA.
|
|||||||
#import "OOLoggingExtended.h"
|
#import "OOLoggingExtended.h"
|
||||||
#import "NSFileManagerOOExtensions.h"
|
#import "NSFileManagerOOExtensions.h"
|
||||||
#import "OOLogOutputHandler.h"
|
#import "OOLogOutputHandler.h"
|
||||||
|
#import "OODebugFlags.h"
|
||||||
|
|
||||||
#define kOOLogUnconvertedNSLog @"unclassified.GameController"
|
#define kOOLogUnconvertedNSLog @"unclassified.GameController"
|
||||||
|
|
||||||
@ -250,7 +251,7 @@ static GameController *sSharedController = nil;
|
|||||||
// Release anything allocated above that is not required.
|
// Release anything allocated above that is not required.
|
||||||
[pool release];
|
[pool release];
|
||||||
#if OOLITE_HAVE_APPKIT
|
#if OOLITE_HAVE_APPKIT
|
||||||
if (fullscreen) [self goFullscreen:(id)YES];
|
if (fullscreen) [self goFullscreen:nil];
|
||||||
#else
|
#else
|
||||||
[[NSRunLoop currentRunLoop] run];
|
[[NSRunLoop currentRunLoop] run];
|
||||||
#endif
|
#endif
|
||||||
@ -554,6 +555,8 @@ static NSComparisonResult CompareDisplayModes(id arg1, id arg2, void *context)
|
|||||||
|
|
||||||
my_mouse_x = my_mouse_y = 0;
|
my_mouse_x = my_mouse_y = 0;
|
||||||
|
|
||||||
|
gDebugFlags |= DEBUG_MISC;
|
||||||
|
|
||||||
while (pauseTarget)
|
while (pauseTarget)
|
||||||
{
|
{
|
||||||
CGPoint centerOfScreen = CGPointMake(width/2.0F,height/2.0F);
|
CGPoint centerOfScreen = CGPointMake(width/2.0F,height/2.0F);
|
||||||
|
@ -355,7 +355,7 @@ static JSBool TimerConstruct(JSContext *context, JSObject *inThis, uintN argc, j
|
|||||||
}
|
}
|
||||||
|
|
||||||
function = argv[1];
|
function = argv[1];
|
||||||
if (!JS_ObjectIsFunction(context, JSVAL_TO_OBJECT(function)))
|
if (JS_ValueToFunction(context, function) == NULL)
|
||||||
{
|
{
|
||||||
OOReportJSBadArguments(context, nil, @"Timer", 1, argv + 1, @"Invalid argument in constructor", @"function");
|
OOReportJSBadArguments(context, nil, @"Timer", 1, argv + 1, @"Invalid argument in constructor", @"function");
|
||||||
return NO;
|
return NO;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user