gstrfuncs: Add missing preconditions to g_str_match_string()

https://bugzilla.gnome.org/show_bug.cgi?id=113075
This commit is contained in:
Philip Withnall 2013-11-28 20:39:56 +00:00 committed by Philip Withnall
parent 81e0a2f362
commit 11297fd183

View File

@ -2944,6 +2944,8 @@ g_str_tokenize_and_fold (const gchar *string,
{
gchar **result;
g_return_val_if_fail (string != NULL, NULL);
if (ascii_alternates && g_str_is_ascii (string))
{
*ascii_alternates = g_new0 (gchar *, 0 + 1);
@ -3037,6 +3039,9 @@ g_str_match_string (const gchar *search_term,
gboolean matched;
gint i, j;
g_return_val_if_fail (search_term != NULL, FALSE);
g_return_val_if_fail (potential_hit != NULL, FALSE);
term_tokens = g_str_tokenize_and_fold (search_term, NULL, NULL);
hit_tokens = g_str_tokenize_and_fold (potential_hit, NULL, accept_alternates ? &alternates : NULL);