From b45c86a5afcedac62b2547001a2aaa9d8dbc4815 Mon Sep 17 00:00:00 2001 From: abakkk Date: Mon, 1 Jun 2020 17:09:44 +0200 Subject: [PATCH] escape empty media-keys settings in the helper close #28 --- draw.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/draw.js b/draw.js index cb542ac..1dae585 100644 --- a/draw.js +++ b/draw.js @@ -1136,6 +1136,8 @@ var DrawingHelper = new Lang.Class({ if (!mediaKeysSettings.settings_schema.has_key(settingKey)) continue; let shortcut = GS_VERSION < '3.33.0' ? mediaKeysSettings.get_string(settingKey) : mediaKeysSettings.get_strv(settingKey)[0]; + if (!shortcut) + continue; let [keyval, mods] = Gtk.accelerator_parse(shortcut); let hbox = new St.BoxLayout({ vertical: false }); hbox.add_child(new St.Label({ text: _(MEDIA_KEYS_KEYS[settingKey]) }));