Set samples to NULL to avoid double free

This commit is contained in:
Nick Lanham 2012-02-07 21:19:44 +01:00
parent 4809e697c0
commit cd1e3f90b3

1
drmr.c
View File

@ -67,6 +67,7 @@ static void* load_thread(void* arg) {
int os = drmr->num_samples; int os = drmr->num_samples;
drmr->num_samples = 0; drmr->num_samples = 0;
if (os > 0) free_samples(drmr->samples,os); if (os > 0) free_samples(drmr->samples,os);
drmr->samples = NULL;
} else } else
load_hydrogen_kit(drmr,drmr->kits->kits[request].path); load_hydrogen_kit(drmr,drmr->kits->kits[request].path);
drmr->curKit = request; drmr->curKit = request;