Fix crash

This commit is contained in:
Alexey Kulish 2017-07-29 12:20:32 +03:00
parent c26d524e1c
commit 1660422a41
2 changed files with 6 additions and 2 deletions

View file

@ -752,7 +752,11 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
}
public void dismissCardDialog() {
getSupportFragmentManager().popBackStack(ContextMenuCardDialogFragment.TAG, FragmentManager.POP_BACK_STACK_INCLUSIVE);
try {
getSupportFragmentManager().popBackStack(ContextMenuCardDialogFragment.TAG, FragmentManager.POP_BACK_STACK_INCLUSIVE);
} catch (Exception e) {
e.printStackTrace();
}
}
@Override

View file

@ -109,7 +109,7 @@ public class ContextMenuCardDialogFragment extends Fragment {
fragment.dialog = menu;
menu.getMapActivity().getSupportFragmentManager().beginTransaction()
.replace(R.id.topFragmentContainer, fragment, TAG)
.addToBackStack(TAG).commit();
.addToBackStack(TAG).commitAllowingStateLoss();
}
public void dismiss() {