changeset 16:038baa026db3

Fixed bug in LinkedList delete. Shouldn't have both popped list and then called FreeData which would check the list again for the data. Instead, I should just get the data and then call FreeData to let it manipulate the list.
author Eric Wing <ewing . public |-at-| gmail . com>
date Sat, 06 Nov 2010 03:59:28 -0700
parents b27f7ff5e44b
children d58eb38c771b
files ALmixer.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ALmixer.c	Sat Nov 06 03:25:25 2010 -0700
+++ b/ALmixer.c	Sat Nov 06 03:59:28 2010 -0700
@@ -7171,7 +7171,8 @@
 	 */
 	while(LinkedList_Size(s_listOfALmixerData) > 0)
 	{
-		ALmixer_Data* almixer_data = LinkedList_PopBack(s_listOfALmixerData);
+		/* Note that ALmixer_FreeData will remove the data from the linked list for us so don't pop the list here. */
+		ALmixer_Data* almixer_data = LinkedList_Back(s_listOfALmixerData);
 		ALmixer_FreeData(almixer_data);
 	}
 	LinkedList_Free(s_listOfALmixerData);