udacity/Sunshine-Version-2

locationCursor.movetoFirst() is causing nullpointerException

Opened this issue · 1 comments

locationCursor.movetofirst() in addLocation method is causing null pointer exception..please help me in fixing this error

Have a check like this
if(locationCursor != null && locationCursor.getCount() > 0){ ... locationCursor.movetofirst(); ... }