From 1223ec6d1e84da4d62704ee40ba4682b17ffcb2c Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Thu, 16 Apr 2026 16:12:04 -0500 Subject: [PATCH] Ensure device view is initialized if there are no LEDs to avoid accessing out of bounds --- qt/DeviceView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt/DeviceView.cpp b/qt/DeviceView.cpp index c5eaed5b..91be107e 100644 --- a/qt/DeviceView.cpp +++ b/qt/DeviceView.cpp @@ -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(); }