Ensure device view is initialized if there are no LEDs to avoid accessing out of bounds

master^2
Adam Honse 3 weeks ago
parent 056b383536
commit 1223ec6d1e

@ -736,7 +736,7 @@ void DeviceView::paintEvent(QPaintEvent* /* event */)
/*-----------------------------------------------------*\
| If controller has resized, reinitialize local data |
\*-----------------------------------------------------*/
if(controller->leds.size() != led_pos.size())
if((controller->zones.size() != zone_pos.size()) || (controller->leds.size() != led_pos.size()))
{
InitDeviceView();
}

Loading…
Cancel
Save