mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-09-22 10:24:56 -04:00
Ensure device view is initialized if there are no LEDs to avoid accessing out of bounds
This commit is contained in:
1 parent
3f32817272
commit
388557e5f9
1 file changed
+1
-1
+1
-1
@@ -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