[gnome-shell/gnome-3-26] dateMenu: Ignore malformed world-clocks settings
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-3-26] dateMenu: Ignore malformed world-clocks settings
- Date: Wed, 6 Dec 2017 01:07:07 +0000 (UTC)
commit b7b59d78b5a011fbae05786decbdd5a710ca9dba
Author: Bastien Nocera <hadess hadess net>
Date: Mon Dec 4 14:30:01 2017 +0100
dateMenu: Ignore malformed world-clocks settings
Guard against a malformed setting that doesn't contain a
'location' key.
https://bugzilla.gnome.org/show_bug.cgi?id=791148
js/ui/dateMenu.js | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/dateMenu.js b/js/ui/dateMenu.js
index 1d48fa8..5908c90 100644
--- a/js/ui/dateMenu.js
+++ b/js/ui/dateMenu.js
@@ -132,6 +132,8 @@ var WorldClocksSection = new Lang.Class({
let world = GWeather.Location.get_world();
let clocks = settings.get_value('world-clocks').deep_unpack();
for (let i = 0; i < clocks.length; i++) {
+ if (!clocks[i].location)
+ continue;
let l = world.deserialize(clocks[i].location);
this._locations.push({ location: l });
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]