[gnome-clocks] world-item: Check if location has coordinates
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks] world-item: Check if location has coordinates
- Date: Fri, 7 Jan 2022 17:23:46 +0000 (UTC)
commit 0fc6e783d743a158036aa8f23edc29a99a4acfa4
Author: Maximiliano Sandoval R <msandova gnome org>
Date: Wed Dec 15 10:50:49 2021 +0100
world-item: Check if location has coordinates
UTC time would produce a G_CRITICAL otherwise.
src/world-item.vala | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/world-item.vala b/src/world-item.vala
index b45a77ac..8ca5a6eb 100644
--- a/src/world-item.vala
+++ b/src/world-item.vala
@@ -296,6 +296,10 @@ public class Item : Object, ContentItem {
return;
}
+ if (!location.has_coords ()) {
+ return;
+ }
+
location.get_coords (out latitude, out longitude);
// Some locations, such as UTC, aren't actual locations and don't have
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]