What should happen here? Is it safe?
NSArray *nullArray=nil;
for (id obj in nullArray) {
// blah
}
More specifically, do I have to do this:
NSArray *array=[thing methodThatMightReturnNil];
if (array) {
for (id obj in array) {
// blah
}
}
or is this fine?:
for (id obj in [thing methodThatMightReturnNil]) {
// blah
}