[Xfce4-commits] <xfce4-panel:devel> Store next node so we don't use the freed list item.

Nick Schermer noreply at xfce.org
Tue Nov 24 16:52:02 CET 2009


Updating branch refs/heads/devel
         to 72fe8466fbda4b583ef6a876323ffaf8fca65646 (commit)
       from df2c729581ac944f8a64b16bade904a548182145 (commit)

commit 72fe8466fbda4b583ef6a876323ffaf8fca65646
Author: Nick Schermer <nick at xfce.org>
Date:   Tue Nov 24 16:51:13 2009 +0100

    Store next node so we don't use the freed list item.

 plugins/launcher/launcher.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/plugins/launcher/launcher.c b/plugins/launcher/launcher.c
index 00c88f8..46729ba 100644
--- a/plugins/launcher/launcher.c
+++ b/plugins/launcher/launcher.c
@@ -471,7 +471,7 @@ launcher_plugin_item_load (LauncherPlugin *plugin,
 {
   GFile          *src_file, *dst_file;
   gchar          *src_path, *dst_path;
-  GSList         *li;
+  GSList         *li, *lnext;
   GarconMenuItem *item = NULL;
   GError         *error = NULL;
 
@@ -541,8 +541,9 @@ launcher_plugin_item_load (LauncherPlugin *plugin,
 
   /* maybe we have this file in the launcher configuration, then we don't
    * have to load it again from the harddisk */
-  for (li = plugin->items; item == NULL && li != NULL; li = li->next)
+  for (li = plugin->items; item == NULL && li != NULL; li = lnext)
     {
+      lnext = li->next;
       dst_file = garcon_menu_item_get_file (GARCON_MENU_ITEM (li->data));
       if (g_file_equal (src_file, dst_file))
         {



More information about the Xfce4-commits mailing list