CoolerMaster ARGB controller: fix crash on rescan
This commit is contained in:
parent
22b8cdbe01
commit
0c6944bb8d
1 changed files with 4 additions and 1 deletions
|
|
@ -36,7 +36,10 @@ CMARGBController::CMARGBController(hid_device* dev_handle, char *_path, unsigned
|
|||
|
||||
CMARGBController::~CMARGBController()
|
||||
{
|
||||
hid_close(dev);
|
||||
if(mutex_ptr.use_count() <= 1)
|
||||
{
|
||||
hid_close(dev);
|
||||
}
|
||||
}
|
||||
|
||||
void CMARGBController::GetStatus()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue