forked from rosebudai/OpenRCT2-Web
Guard against possible nullptr dereference when prefetching BBox (#21978)
This commit is contained in:
1 parent
a611244b31
commit
11510a0e0b
1 file changed
+4
-1
@@ -391,7 +391,10 @@ template<uint8_t TRotation> static void PaintStructsSortQuadrant(PaintStruct* pa
|
||||
auto* ps = child;
|
||||
child = child->NextQuadrantEntry;
|
||||
|
||||
PREFETCH(&child->Bounds);
|
||||
if (child != nullptr)
|
||||
{
|
||||
PREFETCH(&child->Bounds);
|
||||
}
|
||||
if (child == nullptr || child->SortFlags & PaintSortFlags::OutsideQuadrant)
|
||||
{
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user