From f2b511cc5e07476afd53a9b371c13900ee128282 Mon Sep 17 00:00:00 2001 From: Jonathan Klee Date: Mon, 16 Jan 2023 11:58:37 +0100 Subject: [PATCH] Do not make a request with a null custom location --- .../e/blisslauncher/features/weather/WeatherUpdater.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/foundation/e/blisslauncher/features/weather/WeatherUpdater.java b/app/src/main/java/foundation/e/blisslauncher/features/weather/WeatherUpdater.java index d689506dc7..9a10a3a2d8 100644 --- a/app/src/main/java/foundation/e/blisslauncher/features/weather/WeatherUpdater.java +++ b/app/src/main/java/foundation/e/blisslauncher/features/weather/WeatherUpdater.java @@ -147,6 +147,11 @@ public class WeatherUpdater { } protected void requestCustomWeatherUpdate(@Nullable WeatherLocation location) { + if (location == null) { + Log.w(TAG, "Custom location is null. Cannot request weather"); + return; + } + Log.i(TAG, "Requesting weather info for location: " + location); Context context = mWeakContext.get(); LineageWeatherManager weatherManager = LineageWeatherManager.getInstance(context); -- GitLab