Skip to content

Commit

Permalink
fixed possible crash when updating displayed locations
Browse files Browse the repository at this point in the history
  • Loading branch information
vividos committed Aug 10, 2020
1 parent 08d46f1 commit 54b7add
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/App/Core/Views/MapPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,8 @@ private async Task ReloadLocationListAsync()
/// <param name="newLocationList">list of new locations</param>
private void AddAndRemoveDisplayedLocations(List<Location> newLocationList)
{
if (!this.locationList.Any() ||
if (this.locationList == null ||
!this.locationList.Any() ||
Math.Abs(newLocationList.Count - this.locationList.Count) > 10)
{
this.ReplaceLocationList(newLocationList);
Expand Down

0 comments on commit 54b7add

Please sign in to comment.