summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2021-01-12 12:17:26 +0100
committerBastien Nocera <hadess@hadess.net>2021-01-12 15:11:55 +0100
commitbb808529793a47c6458cc48e39630e35155238e0 (patch)
treedd792d9b591c674e2d8fcb37a806316fbc5ad469
parent86eaa6d95fc2f4184be024f01fd2465dc0ede004 (diff)
downloadlibgweather-bb808529793a47c6458cc48e39630e35155238e0.tar.gz
gweather: Require an app-id to run gweather_info_update()
-rw-r--r--libgweather/gweather-weather.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libgweather/gweather-weather.c b/libgweather/gweather-weather.c
index e5548a4..c505ccd 100644
--- a/libgweather/gweather-weather.c
+++ b/libgweather/gweather-weather.c
@@ -690,6 +690,12 @@ gweather_info_update (GWeatherInfo *info)
{
gboolean ok;
+ if (info->providers == GWEATHER_PROVIDER_NONE)
+ return;
+
+ g_return_if_fail (info->application_id != NULL);
+ g_return_if_fail (g_application_id_is_valid (info->application_id));
+
/* Update in progress */
if (!requests_init (info))
return ;