[gnome-boxes/handle-unavailable-input-sources] 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] unnatended-installer: Fix crash when input-source is not available
- Date: Fri, 15 Nov 2019 08:37:08 +0000 (UTC)
commit 7b5a4d11702e44990b828ce6267cc156ad22f9d7
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 98003f3e..da91ae34 100644
--- a/src/unattended-installer.vala
+++ b/src/unattended-installer.vala
@@ -664,7 +664,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]