forked from organicmaps/organicmaps
[android] fix crash on bookmark when pp is closing
Signed-off-by: Arnaud Vergnet <arnaud.vergnet@mailo.com>
This commit is contained in:
parent
f2abf143f1
commit
c19f9bc315
1 changed files with 6 additions and 1 deletions
|
@ -402,6 +402,10 @@ public class PlacePageController extends Fragment implements
|
|||
|
||||
private void onBookmarkBtnClicked()
|
||||
{
|
||||
// mMapObject is set to null when the place page closes
|
||||
// We don't want users to interact with the buttons when the PP is closing
|
||||
if (mMapObject == null)
|
||||
return;
|
||||
// No need to call setMapObject here as the native methods will reopen the place page
|
||||
if (MapObject.isOfType(MapObject.BOOKMARK, mMapObject))
|
||||
Framework.nativeDeleteBookmarkFromMapObject();
|
||||
|
@ -490,7 +494,8 @@ public class PlacePageController extends Fragment implements
|
|||
|
||||
private void onAvoidBtnClicked(@NonNull RoadType roadType)
|
||||
{
|
||||
mPlacePageRouteSettingsListener.onPlacePageRequestToggleRouteSettings(roadType);
|
||||
if (mMapObject != null)
|
||||
mPlacePageRouteSettingsListener.onPlacePageRequestToggleRouteSettings(roadType);
|
||||
}
|
||||
|
||||
private void removePlacePageFragments()
|
||||
|
|
Loading…
Add table
Reference in a new issue