mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 19:13:07 +01:00
Prevent out of bounds access, prevents assert on debug builds
This commit is contained in:
@@ -961,7 +961,7 @@ namespace OpenRCT2
|
||||
{
|
||||
windowClass = w->classification;
|
||||
windowNumber = w->number;
|
||||
widget = &w->widgets[widgetIndex];
|
||||
widget = widgetIndex == kWidgetIndexNull ? nullptr : &w->widgets[widgetIndex];
|
||||
}
|
||||
|
||||
InputWidgetOverChangeCheck(windowClass, windowNumber, widgetIndex);
|
||||
|
||||
Reference in New Issue
Block a user