only attempt to create the GCs if the widget is realized. (Fixes #357578).

2006-09-25  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_set_grid_lines): only attempt
	to create the GCs if the widget is realized. (Fixes #357578).
This commit is contained in:
Kristian Rietveld 2006-09-25 14:25:33 +00:00 committed by Kristian Rietveld
parent c6a50a8194
commit d56ae617ef
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2006-09-25 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_set_grid_lines): only attempt
to create the GCs if the widget is realized. (Fixes #357578).
2006-09-25 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkuimanager.c (_gtk_menu_is_empty): Don't leak

View File

@ -14624,7 +14624,7 @@ gtk_tree_view_set_grid_lines (GtkTreeView *tree_view,
old_grid_lines = priv->grid_lines;
priv->grid_lines = grid_lines;
if (!GTK_WIDGET_REALIZED (widget))
if (GTK_WIDGET_REALIZED (widget))
{
if (grid_lines == GTK_TREE_VIEW_GRID_LINES_NONE &&
priv->grid_line_gc)