Fix Windows crash on startup in Intel i801 detection (Jeampan fix) https://gitlab.com/CalcProgrammer1/OpenRGB/-/issues/766

Commit amended by Adam Honse <calcprogrammer1@gmail.com>
This commit is contained in:
rob Dunn 2022-07-07 10:49:59 +10:00 committed by Adam Honse
parent 3168212214
commit 185c1c3cae

View file

@ -544,7 +544,7 @@ bool i2c_smbus_i801_detect()
std::smatch matches;
// Query the StartingAddress for the matching device ID and use it to enumerate the bus
if (std::regex_search(q_res_PNPAllocatedResource[0]["Antecedent"], matches, rgx2))
if (!q_res_PNPAllocatedResource.empty() && std::regex_search(q_res_PNPAllocatedResource[0]["Antecedent"], matches, rgx2))
{
unsigned int IORangeStart = std::stoi(matches[1].str());