mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-04-04 22:24:12 -04:00
HyperXMicrophoneController: avoid race condition, fixes a crash on rescan.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user