[Mplayer-cvslog] CVS: main playtree.c,1.14,1.15

Alban Bedel CVS albeu at mplayerhq.hu
Sat Nov 2 23:44:18 CET 2002


Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv11162

Modified Files:
	playtree.c 
Log Message:
10L found by jeroen dobbelaere <jeroen dot dobbelaere at acunia dot com>


Index: playtree.c
===================================================================
RCS file: /cvsroot/mplayer/main/playtree.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- playtree.c	23 Apr 2002 20:06:00 -0000	1.14
+++ playtree.c	2 Nov 2002 22:44:15 -0000	1.15
@@ -32,8 +32,11 @@
 #endif
 
   if(childs) {    
-    for(iter = pt->child; iter != NULL; iter = iter->next)
+    for(iter = pt->child; iter != NULL; ) {
+      play_tree_t* nxt=iter->next;
       play_tree_free(iter,1);
+      iter = nxt;
+    }
     pt->child = NULL;
   }
 
@@ -64,8 +67,11 @@
   for(iter = pt ; iter->prev != NULL ; iter = iter->prev)
     /* NOTHING */;
 
-  for( ; iter != NULL ; iter = iter->next)
+  while(iter) {
+    play_tree_t* nxt = iter->next;
     play_tree_free(iter,childs);
+    iter = nxt;
+  }
     
 
 }




More information about the MPlayer-cvslog mailing list