Fix crashes when trackDataHub is null

This commit is contained in:
Jimmy Shih
2012-04-05 17:50:54 -07:00
parent 5082936ad1
commit 9e224d13ad
@@ -415,8 +415,10 @@ public class MapFragment extends Fragment
* accessed by multiple threads. * accessed by multiple threads.
*/ */
private synchronized void updateTrackDataHub() { private synchronized void updateTrackDataHub() {
if (trackDataHub != null) {
trackDataHub.forceUpdateLocation(); trackDataHub.forceUpdateLocation();
} }
}
/** /**
* Updates the map by either zooming to the requested waypoint or showing the track. * Updates the map by either zooming to the requested waypoint or showing the track.