From 05607e31243e5e85a3801d4513192bb1f2150b14 Mon Sep 17 00:00:00 2001 From: Miller Puckette Date: Mon, 30 May 2005 03:04:19 +0000 Subject: Remembered to update all the edited files. Should now be in sync... will have to test it though. svn path=/trunk/; revision=3092 --- pd/portaudio/pa_common/pa_allocation.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'pd/portaudio/pa_common/pa_allocation.c') diff --git a/pd/portaudio/pa_common/pa_allocation.c b/pd/portaudio/pa_common/pa_allocation.c index 8bc7c72f..035b4d0b 100644 --- a/pd/portaudio/pa_common/pa_allocation.c +++ b/pd/portaudio/pa_common/pa_allocation.c @@ -1,5 +1,5 @@ /* - * $Id: pa_allocation.c,v 1.1.2.5 2003/09/20 21:04:44 rossbencina Exp $ + * $Id: pa_allocation.c,v 1.1.2.6 2004/12/20 12:07:51 rossbencina Exp $ * Portable Audio I/O Library allocation group implementation * memory allocation group for tracking allocation groups * @@ -184,12 +184,22 @@ void PaUtil_GroupFreeMemory( PaUtilAllocationGroup* group, void *buffer ) { if( current->buffer == buffer ) { - previous->next = current->next; + if( previous ) + { + previous->next = current->next; + } + else + { + group->allocations = current->next; + } current->buffer = 0; current->next = group->spareLinks; group->spareLinks = current; + + break; } + previous = current; current = current->next; } -- cgit v1.2.1