[gtk+] GtkTreeViewColumn: fix critical warning
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkTreeViewColumn: fix critical warning
- Date: Thu, 6 Feb 2014 17:42:13 +0000 (UTC)
commit 7faf5ee765496148eb59cbe3f848f7bcff03bb39
Author: Claudio Saavedra <csaavedra igalia com>
Date: Tue Feb 4 22:32:02 2014 +0200
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
gtk/gtktreeviewcolumn.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c
index 29deef0..b08045f 100644
--- a/gtk/gtktreeviewcolumn.c
+++ b/gtk/gtktreeviewcolumn.c
@@ -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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]