From 8f817698d1469a6586cb4df1da96f4b275d744ae Mon Sep 17 00:00:00 2001 From: Amr Hossam Date: Fri, 29 Mar 2024 23:00:24 +0200 Subject: [PATCH] Fixed #1187 - Extra validation Signed-off-by: Amr Hossam --- .../main/java/org/onebusaway/android/ui/HomeActivity.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/onebusaway-android/src/main/java/org/onebusaway/android/ui/HomeActivity.java b/onebusaway-android/src/main/java/org/onebusaway/android/ui/HomeActivity.java index 2a19a4aef..726e2449f 100644 --- a/onebusaway-android/src/main/java/org/onebusaway/android/ui/HomeActivity.java +++ b/onebusaway-android/src/main/java/org/onebusaway/android/ui/HomeActivity.java @@ -2035,9 +2035,9 @@ private void makeWeatherRequest(){ @Override public void onWeatherResponseReceived(ObaWeatherResponse response) { - weatherView.setVisibility(View.VISIBLE); - weatherResponse = response; - if(weatherResponse != null && weatherResponse.getCurrent_forecast() != null){ + if(response != null && response.getCurrent_forecast() != null){ + weatherView.setVisibility(View.VISIBLE); + weatherResponse = response; setWeatherData(); } }