Skip to content

Commit

Permalink
Return a local copy of m_cuePoints to avaoid a race consition
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Oct 18, 2022
1 parent a4c9cab commit 6712c19
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/control/control.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ class ControlDoublePrivate : public QObject {
static QList<QSharedPointer<ControlDoublePrivate>> takeAllInstances();

static QHash<ConfigKey, ConfigKey> getControlAliases() {
// Implicitly shared classes can safely be copied across threads
return s_qCOAliasHash;
MMutexLocker locker(&s_qCOHashMutex);
QHash<ConfigKey, ConfigKey> controlAliases = s_qCOAliasHash;
return controlAliases;
}

const QString& name() const {
Expand Down

0 comments on commit 6712c19

Please sign in to comment.