Make this work for list == NULL. (Coverity)

2006-04-12  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkselection-x11.c (make_list): Make this work
	for list == NULL.  (Coverity)
This commit is contained in:
Matthias Clasen
2006-04-12 18:39:47 +00:00
committed by Matthias Clasen
parent d3c0ad6e3d
commit f9d4a3b061
3 changed files with 10 additions and 3 deletions

View File

@@ -1,5 +1,8 @@
2006-04-12 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkselection-x11.c (make_list): Make this work
for list == NULL. (Coverity)
* gtk/gtktextlayout.c (gtk_text_layout_validate_yrange):
Handle _gtk_text_line_get_data() returning NULL in all
cases. (Coverity)

View File

@@ -1,5 +1,8 @@
2006-04-12 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkselection-x11.c (make_list): Make this work
for list == NULL. (Coverity)
* gtk/gtktextlayout.c (gtk_text_layout_validate_yrange):
Handle _gtk_text_line_get_data() returning NULL in all
cases. (Coverity)

View File

@@ -536,9 +536,10 @@ make_list (const gchar *text,
}
if (list)
*list = g_new (gchar *, n_strings + 1);
(*list)[n_strings] = NULL;
{
*list = g_new (gchar *, n_strings + 1);
(*list)[n_strings] = NULL;
}
i = n_strings;
tmp_list = strings;