diff --git a/src/common/fileloadthread.cpp b/src/common/fileloadthread.cpp index 97a2437c..78c42b2a 100644 --- a/src/common/fileloadthread.cpp +++ b/src/common/fileloadthread.cpp @@ -85,6 +85,10 @@ void FileLoadThread::run() file.close(); emit sigLoadFinished(encode, indata, true, false); + // Skip the common cleanup at the end of run(): stop the event loop + // and release the thread object, or both leak on the error path. + this->quit(); + this->deleteLater(); return; }