diff --git a/src/editsample.cpp b/src/editsample.cpp index d013e65..de3b0a3 100644 --- a/src/editsample.cpp +++ b/src/editsample.cpp @@ -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; }