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

This commit is contained in:
morg 2023-10-14 13:42:28 +02:00
parent d4b2d3c381
commit 42731a992e

View file

@ -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()