> On Feb 8, 2016, at 8:09 AM, Steve Sisak wrote:
>
> The nil key pointer is a red herring. -[NSDictionary objectForKey:] can
> return nil if the dictionary doesn’t contain a value for the key.
>
> The analyser is correctly flagging that the code doesn’t handle this case.
No, it isn’t, because
On Feb 8, 2016, at 10:01 AM, Ken Thomases wrote:
>>>
>>> In the case where you do not see a warning, you are calling -[NSDictionary
>>> objectForKey:] which accepts a nil key value (returning nil).
>>
>> Ah, for some reason I thought that is was illegal to pass a nil key to
>> objectForkey
On Feb 8, 2016, at 8:31 AM, Dave wrote:
>
>>
>> In the case where you do not see a warning, you are calling -[NSDictionary
>> objectForKey:] which accepts a nil key value (returning nil).
>
> Ah, for some reason I thought that is was illegal to pass a nil key to
> objectForkey:
It is ill
On Feb 8, 2016, at 7:15 AM, Dave wrote:
>
> myUserInfo = [self.pUserIDDict objectForKey: theUserInfo.pUserID];
> if (myUserInfo != nil)
> {
> LTWAssertAlways(@"myUserInfo - Dupe ID!!");
> }
>
> if (theUserInfo.pUserID != nil)
>
> In the case where you do not see a warning, you are calling -[NSDictionary
> objectForKey:] which accepts a nil key value (returning nil).
Ah, for some reason I thought that is was illegal to pass a nil key to
objectForkey:
Thanks
Dave
___
> On Feb 8, 2016, at 7:15 AM, Dave wrote:
>
> Look at this code:
>
> myUserInfo = [self.pUserIDDict objectForKey: theUserInfo.pUserID];
> if (myUserInfo != nil)
> {
> LTWAssertAlways(@"myUserInfo - Dupe ID!!");
> }
>
> if (theUserInfo.pUserID != nil)
Hi,
Look at this code:
myUserInfo = [self.pUserIDDict objectForKey: theUserInfo.pUserID];
if (myUserInfo != nil)
{
LTWAssertAlways(@"myUserInfo - Dupe ID!!");
}
if (theUserInfo.pUserID != nil)