Add size check before correcting selected zone
This commit is contained in:
parent
5b76b83433
commit
fd4dcbd092
1 changed files with 4 additions and 1 deletions
|
|
@ -1132,7 +1132,10 @@ void Ui::OpenRGBDevicePage::on_ResizeButton_clicked()
|
|||
{
|
||||
int selected_zone = ui->ZoneBox->currentIndex();
|
||||
|
||||
selected_zone -= 1;
|
||||
if (device->zones.size() > 1)
|
||||
{
|
||||
selected_zone -= 1;
|
||||
}
|
||||
|
||||
if(device->zones[selected_zone].type == ZONE_TYPE_LINEAR)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue