Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-02-08 16:55:31 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-02-08 16:55:31 +0300
commitec7df03c867d28316708e9b91bec5cef0aee832e (patch)
tree3f560939b745032e235d9ac789c4117d669d6462 /source/blender/editors/space_sequencer/sequencer_draw.c
parent4c318539b2f6abdf8f2a02376b6fcb8d30a4b12e (diff)
Warning fixes, one actual bug found in sequencer sound wave drawing. Also
changed some malloc to MEM_mallocN while trying to track down a memory leak.
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_draw.c')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 5339acf74d9..0955652c30f 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -186,12 +186,12 @@ static void drawseqwave(Sequence *seq, float x1, float y1, float x2, float y2, f
int length = floor((x2-x1)/stepsize)+1;
float ymid = (y1+y2)/2;
float yscale = (y2-y1)/2;
- float* samples = malloc(length * sizeof(float) * 2);
+ float* samples = MEM_mallocN(length * sizeof(float) * 2, "seqwave_samples");
if(!samples)
return;
if(sound_read_sound_buffer(seq->sound, samples, length) != length)
{
- free(samples);
+ MEM_freeN(samples);
return;
}
glBegin(GL_LINES);
@@ -201,7 +201,7 @@ static void drawseqwave(Sequence *seq, float x1, float y1, float x2, float y2, f
glVertex2f(x1+i*stepsize, ymid + samples[i * 2 + 1] * yscale);
}
glEnd();
- free(samples);
+ MEM_freeN(samples);
}
}