Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question about null pointers



2005-04-14 kl. 19.55 skrev Nicholas R. Rinard:

i have a strange problem. i have a line of code:

if( model == null ) {

and, shockingly, this line of code is throwing a null pointer exception. this line of code is called from within my app startup routine but is called after model is initialized.

can anyone tell me why testing for null would throw a null pointer exception?

Please supply more information and we might be able to do more than close our eyes and take a guess.

What is "model"? How and where is it declared? Where
is this line of code? In a constructor? In a function? Static?

    /// Isak Styf

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >question about null pointers (From: "Nicholas R. Rinard" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.