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
This commit is contained in:
parent
ecb809bb89
commit
e85816f83b
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue