This commit is contained in:
Eknous-P 2024-12-08 23:42:48 +04:00 committed by tildearrow
parent 5f299996df
commit d26c8d576b

View file

@ -885,12 +885,11 @@ void FurnaceGUI::doAction(int what) {
break;
case GUI_ACTION_WAVE_LIST_CREATE_SAMPLE:
if (curWave>=0 && curWave<(int)e->song.wave.size()) {
DivSample* prevSample=e->getSample(curSample);
curSample=e->addSample();
if (curSample==-1) {
showError(_("too many samples!"));
} else {
e->lockEngine([this,prevSample]() {
e->lockEngine([this]() {
DivSample* sample=e->getSample(curSample);
if (sample!=NULL) {
unsigned int waveLen=e->song.wave[curWave]->len;