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

This commit is contained in:
Adam Honse committed 2026-04-20 23:32:17 -05:00
1 parent 3f32817272
commit 388557e5f9
1 file changed
+1 -1
+1 -1
View File
@@ -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();
}