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
@@ -414,8 +414,10 @@ public class MapFragment extends Fragment
* Updates the trackDataHub. Needs to be synchronized because trackDataHub can be * Updates the trackDataHub. Needs to be synchronized because trackDataHub can be
* accessed by multiple threads. * accessed by multiple threads.
*/ */
private synchronized void updateTrackDataHub() { private synchronized void updateTrackDataHub() {
trackDataHub.forceUpdateLocation(); if (trackDataHub != null) {
trackDataHub.forceUpdateLocation();
}
} }
/** /**