Can someone explain “Dereference of a null pointer” warning
问题 I've written a couple of apps which work and seem bug free (ie, they don't crash...) but I get warnings for the code below (which I use a few times) - In the @interface - GameViewController *controller; In the @implementation - -(id)initWithOwner:(GameViewController *)aController withName:(NSString *)manName { if (self = [super init]) { // do stuff } controller = aController; On that last line, it says "Dereference of a null pointer". I'm fairly new to Objective-C (and C as well) so I haven't