fixed segfault in edit button

This commit is contained in:
mrbesen 2022-05-01 14:49:14 +02:00
parent abfc59d063
commit 4f4bc90bf8
Signed by: MrBesen
GPG Key ID: 596B2350DCD67504
1 changed files with 4 additions and 0 deletions

View File

@ -30,6 +30,10 @@ EditSample::EditSample(const std::string& audioFile_, QWidget *parent) : QDialog
}
EditSample::~EditSample() {
// here was a race condition: when the sample is played and the current possition is updated
// after this object is destroyed there will be a segfault.
stop();
delete ui;
}