Commit 7faf5ee7 authored by Claudio Saavedra's avatar Claudio Saavedra

GtkTreeViewColumn: fix critical warning

Do not call _column_autosize() if there is no treeview set yet.

https://bugzilla.gnome.org/show_bug.cgi?id=723637
parent b91859a1
......@@ -2273,7 +2273,7 @@ gtk_tree_view_column_set_min_width (GtkTreeViewColumn *tree_column,
g_object_notify (G_OBJECT (tree_column), "min-width");
g_object_thaw_notify (G_OBJECT (tree_column));
if (priv->column_type == GTK_TREE_VIEW_COLUMN_AUTOSIZE)
if (priv->column_type == GTK_TREE_VIEW_COLUMN_AUTOSIZE && priv->tree_view)
_gtk_tree_view_column_autosize (GTK_TREE_VIEW (priv->tree_view),
tree_column);
}
......@@ -2337,7 +2337,7 @@ gtk_tree_view_column_set_max_width (GtkTreeViewColumn *tree_column,
g_object_notify (G_OBJECT (tree_column), "max-width");
g_object_thaw_notify (G_OBJECT (tree_column));
if (priv->column_type == GTK_TREE_VIEW_COLUMN_AUTOSIZE)
if (priv->column_type == GTK_TREE_VIEW_COLUMN_AUTOSIZE && priv->tree_view)
_gtk_tree_view_column_autosize (GTK_TREE_VIEW (priv->tree_view),
tree_column);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment