1
0
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:
ζeh Matt
2025-01-23 11:00:30 +02:00
parent f70d202cf0
commit 9138fba9cf

View File

@@ -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);