Fix coolermaster rescan crash

This commit is contained in:
Tam D
2024-01-07 21:45:18 +00:00
committed by Adam Honse
parent 477fabd381
commit f5bbd49e78
2 changed files with 13 additions and 18 deletions

View File

@@ -53,11 +53,8 @@ RGBController_CMKeyboardController::~RGBController_CMKeyboardController()
delete(m_pUnknownKeyNames[i]);
}
}
delete m_pLayoutManager;
}
#include <set>
#define COOLERMASTER_ZONES_MAX 1
void RGBController_CMKeyboardController::SetupZones()
{
@@ -115,7 +112,7 @@ void RGBController_CMKeyboardController::SetupZones()
LOG_DEBUG("[%s] Created KB matrix with %d rows and %d columns containing %d keys",
m_pController->GetDeviceName().c_str(), new_kb.GetRowCount(), new_kb.GetColumnCount(), new_zone.leds_count);
for(size_t led_idx = 0; led_idx < new_zone.leds_count; led_idx++)
for(unsigned int led_idx = 0; led_idx < new_zone.leds_count; led_idx++)
{
led new_led;