forked from upstream-mirrors/OpenTracks
Fix crashes when trackDataHub is null
This commit is contained in:
@@ -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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user