From 4f4bc90bf8262585240c71e8ec0ee9734515f92f Mon Sep 17 00:00:00 2001 From: mrbesen Date: Sun, 1 May 2022 14:49:14 +0200 Subject: [PATCH] fixed segfault in edit button --- src/editsample.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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; }