Fix crash with OSM Live update
This commit is contained in:
parent
7ea02dcdae
commit
b6f6680557
2 changed files with 7 additions and 4 deletions
|
@ -18,10 +18,7 @@ public class BaseOsmAndFragment extends Fragment {
|
|||
private IconsCache iconsCache;
|
||||
|
||||
protected OsmandApplication getMyApplication() {
|
||||
if (isAdded()) {
|
||||
return (OsmandApplication) getActivity().getApplication();
|
||||
}
|
||||
return null;
|
||||
return (OsmandApplication) getActivity().getApplication();
|
||||
}
|
||||
|
||||
protected OsmandActionBarActivity getMyActivity() {
|
||||
|
|
|
@ -79,6 +79,12 @@ public class OsmLiveActivity extends AbstractDownloadActivity implements Downloa
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
getMyApplication().getDownloadThread().resetUiActivity(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
|
Loading…
Reference in a new issue