fix export crash :<

This commit is contained in:
tildearrow 2021-12-21 16:05:21 -05:00
parent 726b457ae7
commit c6ae198283

View file

@ -802,11 +802,13 @@ bool DivEngine::nextTick(bool noAccum) {
} }
void DivEngine::nextBuf(float** in, float** out, int inChans, int outChans, unsigned int size) { void DivEngine::nextBuf(float** in, float** out, int inChans, int outChans, unsigned int size) {
memset(out[0],0,size*sizeof(float)); if (out!=NULL) {
memset(out[1],0,size*sizeof(float)); memset(out[0],0,size*sizeof(float));
memset(out[1],0,size*sizeof(float));
}
isBusy.lock(); isBusy.lock();
if (sPreview.sample>=0 && sPreview.sample<(int)song.sample.size()) { if (out!=NULL && sPreview.sample>=0 && sPreview.sample<(int)song.sample.size()) {
DivSample* s=song.sample[sPreview.sample]; DivSample* s=song.sample[sPreview.sample];
size_t prevtotal=blip_clocks_needed(bb[2],size); size_t prevtotal=blip_clocks_needed(bb[2],size);