HyperXMicrophoneController: avoid race condition, fixes a crash on rescan.

This commit is contained in:
morg committed 2023-10-20 18:14:12 +02:00
1 parent d4b2d3c381
commit 42731a992e
1 file changed
+4
@@ -34,10 +34,14 @@ HyperXMicrophoneController::HyperXMicrophoneController(hidapi_wrapper hid_wrappe
HyperXMicrophoneController::~HyperXMicrophoneController()
{
lock.lock();
if(dev)
{
wrapper.hid_close(dev);
}
lock.unlock();
}
std::string HyperXMicrophoneController::GetDeviceLocation()