Test "Date SunsetTime = c.getSunset(); " to see if it is returning
NULL, before using it in the next line.

On Apr 22, 10:41 am, Jake Colman <[email protected]> wrote:
> The code that triggers this crash is as follows:
>
> ZmanimCalendar c = new ZmanimCalendar(l);
> Date SunsetTime = c.getSunset();
> String SunsetTimeString =
>    DateFormat.getTimeInstance(DateFormat.SHORT).format(SunsetTime);
>
> What could possibly trigger an NPE in this code?  Is there something I
> should be checking about SunsetTime before passing it in to be
> formatted?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to