Skip to content

Commit

Permalink
Failure handling if a NULL was passed in as a value.
Browse files Browse the repository at this point in the history
  • Loading branch information
Blain Hamon authored and Blain Hamon committed Sep 10, 2010
1 parent eed4450 commit 80c083d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions iphone/Classes/KrollObject.m
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,12 @@ BOOL IsArrayLike(TiContextRef jsContext, TiObjectRef object)
//
id TiValueToId(KrollContext *context, TiValueRef v)
{
if (v == NULL)
{
//As opposed to null, this really is a case of no value.
//TODO: Right? Or should this be a NSNull?
return nil;
}
TiContextRef jsContext = [context context];
if (TiValueIsString(jsContext,v))
{
Expand Down

0 comments on commit 80c083d

Please sign in to comment.