Skip to content

Commit 1f76d8f

Browse files
committed
Add missing locker in ControllerManager::slotInitialize()
1 parent bf2900e commit 1f76d8f

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

src/controllers/controllermanager.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,18 +168,21 @@ void ControllerManager::slotInitialize() {
168168

169169
// Instantiate all enumerators. Enumerators can take a long time to
170170
// construct since they interact with host MIDI APIs.
171+
{
172+
auto locker = lockMutex(&m_mutex);
171173
#ifdef __PORTMIDI__
172-
m_enumerators.push_back(std::make_unique<PortMidiEnumerator>(m_pConfig));
174+
m_enumerators.push_back(std::make_unique<PortMidiEnumerator>(m_pConfig));
173175
#endif
174176
#ifdef __HSS1394__
175-
m_enumerators.push_back(std::make_unique<Hss1394Enumerator>());
177+
m_enumerators.push_back(std::make_unique<Hss1394Enumerator>());
176178
#endif
177179
#ifdef __BULK__
178-
m_enumerators.push_back(std::make_unique<BulkEnumerator>());
180+
m_enumerators.push_back(std::make_unique<BulkEnumerator>());
179181
#endif
180182
#ifdef __HID__
181-
m_enumerators.push_back(std::make_unique<HidEnumerator>());
183+
m_enumerators.push_back(std::make_unique<HidEnumerator>());
182184
#endif
185+
} // Mutex locker released here
183186
emit initialized();
184187
}
185188

0 commit comments

Comments
 (0)