Skip to content

Commit

Permalink
fix exception in jsCocoaObject_setProperty
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaspars Dancis committed Feb 10, 2012
1 parent a0f5360 commit f794126
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions JSCocoa/JSCocoaController.m
Original file line number Diff line number Diff line change
Expand Up @@ -3922,8 +3922,12 @@ static bool jsCocoaObject_setProperty(JSContextRef ctx, JSObjectRef object, JSSt
id property = NULL;
if ([JSCocoaFFIArgument unboxJSValueRef:jsValue toObject:&property inContext:ctx])
{
[array replaceObjectAtIndex:propertyIndex withObject:property];
return true;
if (property) {
[array replaceObjectAtIndex:propertyIndex withObject:property];
return true;
} else {
return false;
}
}
else return false;
}
Expand Down

0 comments on commit f794126

Please sign in to comment.