From d25d65852f8f4f954b8672654fdee0b9da973e8b Mon Sep 17 00:00:00 2001
From: Michael Natterer <mitch@imendio.com>
Date: Sat, 22 Oct 2005 21:08:23 +0000
Subject: [PATCH] check for the widget being realized, in addition to being
 visible, to

2005-10-22  Michael Natterer  <mitch@imendio.com>

	* gtk/gtktreeview.c (gtk_tree_view_scroll_to_cell): check for the
	widget being realized, in addition to being visible, to avoid
	running into precondition check in gtk_tree_view_get_cell_area().
	(approved by Kris).
---
 ChangeLog          | 7 +++++++
 ChangeLog.pre-2-10 | 7 +++++++
 gtk/gtktreeview.c  | 1 +
 3 files changed, 15 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index db5d00b53e..faa63b5cbd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-10-22  Michael Natterer  <mitch@imendio.com>
+
+	* gtk/gtktreeview.c (gtk_tree_view_scroll_to_cell): check for the
+	widget being realized, in addition to being visible, to avoid
+	running into precondition check in gtk_tree_view_get_cell_area().
+	(approved by Kris).
+
 2005-10-22  Dom Lachowicz <cinamod@hotmail.com>
 
 	* modules/engines/ms-windows/msw_style.c (setup_msw_rc_style): 
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index db5d00b53e..faa63b5cbd 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,10 @@
+2005-10-22  Michael Natterer  <mitch@imendio.com>
+
+	* gtk/gtktreeview.c (gtk_tree_view_scroll_to_cell): check for the
+	widget being realized, in addition to being visible, to avoid
+	running into precondition check in gtk_tree_view_get_cell_area().
+	(approved by Kris).
+
 2005-10-22  Dom Lachowicz <cinamod@hotmail.com>
 
 	* modules/engines/ms-windows/msw_style.c (setup_msw_rc_style): 
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index d1f62ffdcd..50cf27924d 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -10377,6 +10377,7 @@ gtk_tree_view_scroll_to_cell (GtkTreeView       *tree_view,
    * it is much slower than just going to the point.
    */
   if (! GTK_WIDGET_VISIBLE (tree_view) ||
+      ! GTK_WIDGET_REALIZED (tree_view) ||
       GTK_WIDGET_ALLOC_NEEDED (tree_view) || 
       GTK_RBNODE_FLAG_SET (tree_view->priv->tree->root, GTK_RBNODE_DESCENDANTS_INVALID))
     {
-- 
GitLab