From c6ae198283c3ed4bf2a138d376b5c219c6750cce Mon Sep 17 00:00:00 2001 From: tildearrow Date: Tue, 21 Dec 2021 16:05:21 -0500 Subject: [PATCH] fix export crash :< --- src/engine/playback.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/engine/playback.cpp b/src/engine/playback.cpp index 1feb9e2ee..0d23e3fa3 100644 --- a/src/engine/playback.cpp +++ b/src/engine/playback.cpp @@ -802,11 +802,13 @@ bool DivEngine::nextTick(bool noAccum) { } void DivEngine::nextBuf(float** in, float** out, int inChans, int outChans, unsigned int size) { - memset(out[0],0,size*sizeof(float)); - memset(out[1],0,size*sizeof(float)); + if (out!=NULL) { + memset(out[0],0,size*sizeof(float)); + memset(out[1],0,size*sizeof(float)); + } 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]; size_t prevtotal=blip_clocks_needed(bb[2],size);