Added exception handling in MapFragment
This commit is contained in:
parent
4c189a0724
commit
ef9092467f
|
|
@ -446,8 +446,10 @@ public class MapFragment extends Fragment {
|
||||||
showPlaceBottomSheet(closestPlace);
|
showPlaceBottomSheet(closestPlace);
|
||||||
} else {
|
} else {
|
||||||
// No close places found
|
// No close places found
|
||||||
|
if (isAdded() && getContext() != null) {
|
||||||
Helper.makeSnackBar(rlMap, "No places found near this location");
|
Helper.makeSnackBar(rlMap, "No places found near this location");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Helper.makeSnackBar(rlMap, "Location not found");
|
Helper.makeSnackBar(rlMap, "Location not found");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue