[libgweather/wip/hadess/app-id: 4/9] gweather: Require an app-id to run gweather_info_update()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather/wip/hadess/app-id: 4/9] gweather: Require an app-id to run gweather_info_update()
- Date: Tue, 12 Jan 2021 12:36:52 +0000 (UTC)
commit 9ab376f35e0d0df12d09cdaca8fc55b69144a688
Author: Bastien Nocera <hadess hadess net>
Date: Tue Jan 12 12:17:26 2021 +0100
gweather: Require an app-id to run gweather_info_update()
libgweather/gweather-weather.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/libgweather/gweather-weather.c b/libgweather/gweather-weather.c
index 7e2612b5..b704b8f0 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 ;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]