[maemo-commits] [maemo-commits] r18563 - in projects/haf/trunk/gtk+: . gtk

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Mon Jun 1 16:25:04 EEST 2009
Author: kris
Date: 2009-06-01 16:24:49 +0300 (Mon, 01 Jun 2009)
New Revision: 18563

Modified:
   projects/haf/trunk/gtk+/ChangeLog
   projects/haf/trunk/gtk+/gtk/gtktreeview.c
Log:
2009-06-01  Kristian Rietveld  <kris at imendio.com>

	Fixes: NB#118755 - Application manager crashes when uninstalling
	an application

	(and it's many duplicates).

	* gtk/gtktreeview.c (gtk_tree_view_button_release): Properly
	handle a NULL ->priv->tree.  We need to run through the remaining
	logic to properly unset row reference of the delayed actions.
	Unfortunately this didn't get caught during my earlier testing due to
	dep. problems ...



Modified: projects/haf/trunk/gtk+/ChangeLog
===================================================================
--- projects/haf/trunk/gtk+/ChangeLog	2009-06-01 12:38:27 UTC (rev 18562)
+++ projects/haf/trunk/gtk+/ChangeLog	2009-06-01 13:24:49 UTC (rev 18563)
@@ -1,3 +1,16 @@
+2009-06-01  Kristian Rietveld  <kris at imendio.com>
+
+	Fixes: NB#118755 - Application manager crashes when uninstalling
+	an application
+
+	(and it's many duplicates).
+
+	* gtk/gtktreeview.c (gtk_tree_view_button_release): Properly
+	handle a NULL ->priv->tree.  We need to run through the remaining
+	logic to properly unset row reference of the delayed actions.
+	Unfortunately this didn't get caught during my earlier testing due to
+	dep. problems ...
+
 2009-05-27  Claudio Saavedra  <csaavedra at igalia.com>
 
 	Released 2:2.12.12-1maemo18

Modified: projects/haf/trunk/gtk+/gtk/gtktreeview.c
===================================================================
--- projects/haf/trunk/gtk+/gtk/gtktreeview.c	2009-06-01 12:38:27 UTC (rev 18562)
+++ projects/haf/trunk/gtk+/gtk/gtktreeview.c	2009-06-01 13:24:49 UTC (rev 18563)
@@ -3551,11 +3551,22 @@
                         "hildon-mode", &mode,
                         NULL);
 
-  /* Get the node where the mouse was released */
-  new_y = TREE_WINDOW_Y_TO_RBTREE_Y (tree_view, event->y);
-  if (new_y < 0)
-    new_y = 0;
-  _gtk_rbtree_find_offset (tree_view->priv->tree, new_y, &tree, &node);
+  if (tree_view->priv->tree)
+    {
+      /* Get the node where the mouse was released */
+      new_y = TREE_WINDOW_Y_TO_RBTREE_Y (tree_view, event->y);
+      if (new_y < 0)
+        new_y = 0;
+      _gtk_rbtree_find_offset (tree_view->priv->tree, new_y, &tree, &node);
+    }
+  else
+    {
+      /* We just set tree and node to NULL otherwise.  We still want
+       * to run through below's logic to free row references where needed.
+       */
+      tree = NULL;
+      node = NULL;
+    }
 
   if (gtk_tree_row_reference_valid (tree_view->priv->queued_select_row))
     {


More information about the maemo-commits mailing list