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