NPE check

This commit is contained in:
fullwall 2012-03-25 16:28:47 +08:00
parent de821df98d
commit 942e7ae9ed

View File

@ -75,6 +75,8 @@ public class GenericWaypointCallback extends NavigationCallback {
public void onProviderChanged() {
itr = provider.iterator();
if (ai == null)
return;
dest = itr.hasNext() ? itr.next().getLocation() : null;
if (dest != null) {
ai.setDestination(dest);