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