Blob Blame History Raw
From c62b52a81d5ac9562d78607914736c29124db004 Mon Sep 17 00:00:00 2001
From: Rui Matos <tiagomatos@gmail.com>
Date: Tue, 16 Dec 2014 16:33:49 +0000
Subject: [PATCH] keyboard: Fix a crash

If there's no default input source for a given locale, id would go
uninitialized and then crash further down when accessing it for a
string comparison.

https://bugzilla.redhat.com/show_bug.cgi?id=1172363
---
 gnome-initial-setup/pages/keyboard/cc-input-chooser.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnome-initial-setup/pages/keyboard/cc-input-chooser.c b/gnome-initial-setup/pages/keyboard/cc-input-chooser.c
index c5bd085..4e3400c 100644
--- a/gnome-initial-setup/pages/keyboard/cc-input-chooser.c
+++ b/gnome-initial-setup/pages/keyboard/cc-input-chooser.c
@@ -397,7 +397,8 @@ static void
 get_locale_infos (CcInputChooser *chooser)
 {
         CcInputChooserPrivate *priv = cc_input_chooser_get_instance_private (chooser);
-	const gchar *type, *id;
+	const gchar *type = NULL;
+	const gchar *id = NULL;
 	gchar *lang, *country;
 	GList *list;
 
-- 
1.9.0