device page: disable resize button if there are no zones
I have an unsupported Asus GPU which shows up as a device but doesn't have any zone configured. Clicking on the Resize button leads to an out-of-bounds read in the empty `zones` vector to `zones[-1]` (default value of the QComboBox property). The fix is to entirely disable the button when we're disabling the zones box.
This commit is contained in:
parent
b6172b71c8
commit
acb313631f
1 changed files with 1 additions and 0 deletions
|
|
@ -703,6 +703,7 @@ void Ui::OpenRGBDevicePage::UpdateModeUi()
|
|||
else
|
||||
{
|
||||
ui->ZoneBox->setDisabled(1);
|
||||
ui->ResizeButton->setEnabled(false);
|
||||
}
|
||||
|
||||
for (std::size_t i = 0; i < device->zones.size(); i++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue