Skip to content

Commit

Permalink
fix(droid): Geolocator listener crash
Browse files Browse the repository at this point in the history
  • Loading branch information
ajpinedam committed Dec 28, 2023
1 parent eac2d16 commit af652ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Uno.UWP/Devices/Geolocation/Geolocator.Android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ private static async Task<GeolocationAccessStatus> RequestAccessCore()
{
TryInitialize();

if (_locationProvider is null || _locationManager is null)
if (string.IsNullOrWhiteSpace(_locationProvider) || _locationManager is null)
{
return Task.FromResult<Geoposition?>(null);
}
Expand Down Expand Up @@ -262,7 +262,7 @@ private void TryInitialize()
if (_locationManager == null)
{
_locationManager = InitializeLocationProvider();
if (_locationManager is null || _locationProvider is null)
if (_locationManager is null || string.IsNullOrWhiteSpace(_locationProvider))
{
return;
}
Expand Down

0 comments on commit af652ec

Please sign in to comment.