[maemo-commits] [maemo-commits] r9544 - in projects/haf/branches/maemo-af-desktop/hildon-desktop: . libhildondesktop

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Feb 1 18:28:10 EET 2007
Author: jobi
Date: 2007-02-01 18:28:09 +0200 (Thu, 01 Feb 2007)
New Revision: 9544

Modified:
   projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
   projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-home-area.c
Log:

2007-02-01  Johan Bilien  <johan.bilien at nokia.com>

	* libhildondesktop/hildon-home-area.c: Fixed a double free of
	a GList



Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog	2007-02-01 16:24:08 UTC (rev 9543)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog	2007-02-01 16:28:09 UTC (rev 9544)
@@ -1,5 +1,10 @@
 2007-02-01  Johan Bilien  <johan.bilien at nokia.com>
 
+	* libhildondesktop/hildon-home-area.c: Fixed a double free of
+	a GList
+
+2007-02-01  Johan Bilien  <johan.bilien at nokia.com>
+
 	* src/hd-select-plugins-dialog.c: Fixed the leak of a GDir
 
 2007-02-01  Lucas Rocha  <lucas.rocha at nokia.com>

Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-home-area.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-home-area.c	2007-02-01 16:24:08 UTC (rev 9543)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-home-area.c	2007-02-01 16:28:09 UTC (rev 9544)
@@ -453,6 +453,10 @@
   g_return_if_fail (area);
 
   priv = HILDON_HOME_AREA_GET_PRIVATE (area);
+
+  if (!applets)
+    return;
+
   applets = g_list_sort (applets, (GCompareFunc)sort_by_area);
 
   to_place = g_list_copy (applets);
@@ -536,7 +540,7 @@
           gtk_container_add (GTK_CONTAINER (area), applet);
         }
       gtk_widget_show_all (applet);
-      applets = g_list_remove (applets, applet);
+/*      applets = g_list_remove (applets, applet);*/
 
 
       if (selected_column >= 0)
@@ -573,6 +577,11 @@
   to_place = g_list_concat (children, priv->to_add);
 
   hildon_home_area_place (area, to_place);
+
+  g_list_free (children);
+/*  g_list_free (priv->to_add);*/
+  priv->to_add = NULL;
+
 }
 
 static void


More information about the maemo-commits mailing list