fix file not closing when loading .dmc or .brr

This commit is contained in:
tildearrow 2024-11-24 15:31:52 -05:00
parent 4fffb76071
commit c531f777af

View file

@ -113,6 +113,7 @@ std::vector<DivSample*> DivEngine::sampleFromFile(const char* path) {
logW("did not read entire sample bank file buffer!");
lastError=_("did not read entire sample bank file!");
delete[] buf;
fclose(f);
return ret;
}
fclose(f);
@ -271,6 +272,7 @@ std::vector<DivSample*> DivEngine::sampleFromFile(const char* path) {
delete sample;
return ret;
}
fclose(f);
BUSY_END;
ret.push_back(sample);
return ret;