From e85816f83b09e1c821ba12b343860a32c2851299 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 26 Mar 2019 12:14:03 +1300 Subject: [PATCH] common: Fix crash in language chooser A report in Red Hat bugzilla [1] shows for some reason the country is set to NULL and this causes a crash when comparing against search terms. The solution is to handle the NULL without crashing. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1685251 --- panels/common/cc-language-chooser.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/panels/common/cc-language-chooser.c b/panels/common/cc-language-chooser.c index ae6391a78..1c15b4333 100644 --- a/panels/common/cc-language-chooser.c +++ b/panels/common/cc-language-chooser.c @@ -188,6 +188,9 @@ match_all (gchar **words, { gchar **w; + if (str == NULL) + return FALSE; + for (w = words; *w; ++w) if (!strstr (str, *w)) return FALSE;