Don't crash if item is NULL. (#131542, Dan Damian)

Sun Feb 22 02:10:34 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkentrycompletion.c (gtk_entry_completion_default_completion_func):
	Don't crash if item is NULL.  (#131542, Dan Damian)
This commit is contained in:
Matthias Clasen 2004-02-22 01:07:39 +00:00 committed by Matthias Clasen
parent 74fd4c9581
commit 8d4f4d5fde
6 changed files with 37 additions and 9 deletions

View File

@ -1,3 +1,8 @@
Sun Feb 22 02:10:34 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkentrycompletion.c (gtk_entry_completion_default_completion_func):
Don't crash if item is NULL. (#131542, Dan Damian)
Sun Feb 22 02:04:03 2004 Matthias Clasen <maclas@gmx.de>
* configure.in: Add a check for a new enough fontconfig, since

View File

@ -1,3 +1,8 @@
Sun Feb 22 02:10:34 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkentrycompletion.c (gtk_entry_completion_default_completion_func):
Don't crash if item is NULL. (#131542, Dan Damian)
Sun Feb 22 02:04:03 2004 Matthias Clasen <maclas@gmx.de>
* configure.in: Add a check for a new enough fontconfig, since

View File

@ -1,3 +1,8 @@
Sun Feb 22 02:10:34 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkentrycompletion.c (gtk_entry_completion_default_completion_func):
Don't crash if item is NULL. (#131542, Dan Damian)
Sun Feb 22 02:04:03 2004 Matthias Clasen <maclas@gmx.de>
* configure.in: Add a check for a new enough fontconfig, since

View File

@ -1,3 +1,8 @@
Sun Feb 22 02:10:34 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkentrycompletion.c (gtk_entry_completion_default_completion_func):
Don't crash if item is NULL. (#131542, Dan Damian)
Sun Feb 22 02:04:03 2004 Matthias Clasen <maclas@gmx.de>
* configure.in: Add a check for a new enough fontconfig, since

View File

@ -1,3 +1,8 @@
Sun Feb 22 02:10:34 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkentrycompletion.c (gtk_entry_completion_default_completion_func):
Don't crash if item is NULL. (#131542, Dan Damian)
Sun Feb 22 02:04:03 2004 Matthias Clasen <maclas@gmx.de>
* configure.in: Add a check for a new enough fontconfig, since

View File

@ -507,15 +507,18 @@ gtk_entry_completion_default_completion_func (GtkEntryCompletion *completion,
completion->priv->text_column, &item,
-1);
normalized_string = g_utf8_normalize (item, -1, G_NORMALIZE_ALL);
case_normalized_string = g_utf8_casefold (normalized_string, -1);
if (!strncmp (key, case_normalized_string, strlen (key)))
ret = TRUE;
g_free (item);
g_free (normalized_string);
g_free (case_normalized_string);
if (item != NULL)
{
normalized_string = g_utf8_normalize (item, -1, G_NORMALIZE_ALL);
case_normalized_string = g_utf8_casefold (normalized_string, -1);
if (!strncmp (key, case_normalized_string, strlen (key)))
ret = TRUE;
g_free (item);
g_free (normalized_string);
g_free (case_normalized_string);
}
return ret;
}