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