mirror of https://github.com/OpenRCT2/OpenRCT2.git
Guard against possible nullptr dereference when prefetching BBox (#21978)
This commit is contained in:
parent
a611244b31
commit
11510a0e0b
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue