mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-10 07:32:56 -04:00
Ensure device view is initialized if there are no LEDs to avoid accessing out of bounds
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user