I have the following code in a loop
NSArray * images = [definitionDict objectForKey:@"Images"];
NSLog(@"images in definitionDict %@", images);
if (!images )
NSLog(@"NULL");
else
NSLog(@"NOTNULL");
which gives the following outputs
images in definitionDict (
"/some/brol/brol.jpg"
)
NOTNULL
images in definitionDict <null>
NOTNULL
I do not understand the second case, where the images array is null. Why is this not detected correctly in my test ? How can I debug such a problem ?