[gnome-boxes/handle-unavailable-input-sources-3-34: 2/2] unnatended-installer: Fix crash when input-source is not available
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/handle-unavailable-input-sources-3-34: 2/2] unnatended-installer: Fix crash when input-source is not available
- Date: Fri, 15 Nov 2019 08:39:05 +0000 (UTC)
commit 41e3124a70396bd08e248b9252aac53423ad6b3d
Author: Felipe Borges <felipeborges gnome org>
Date: Fri Nov 15 09:35:35 2019 +0100
unnatended-installer: Fix crash when input-source is not available
Fixes #438
src/unattended-installer.vala | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/unattended-installer.vala b/src/unattended-installer.vala
index cac78ed1..075c5778 100644
--- a/src/unattended-installer.vala
+++ b/src/unattended-installer.vala
@@ -685,7 +685,10 @@ private string get_preferred_keyboard (string lang) {
var sources = input_settings.get_value ("sources");
if (sources != null) {
- kbd_layout = sources.get_child_value (0).get_child_value (1).get_string ();
+ var sources_pair = sources.get_child_value (0);
+ if (sources_pair != null) {
+ kbd_layout = sources_pair.get_child_value (1).get_string ();
+ }
}
if (datamap.reverse_lookup (kbd_layout) != null) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]