mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-26 00:04:43 +01:00
Tiny GetEntity Refactor (#12124)
* Use default template parameter instead of specialising * Fix null deref issues
This commit is contained in:
@@ -1573,7 +1573,7 @@ static int32_t cc_mp_desync(InteractiveConsole& console, const arguments_t& argv
|
||||
for (int i = 0; i < MAX_SPRITES; i++)
|
||||
{
|
||||
auto* sprite = GetEntity(i);
|
||||
if (sprite->sprite_identifier == SPRITE_IDENTIFIER_NULL)
|
||||
if (sprite == nullptr || sprite->sprite_identifier == SPRITE_IDENTIFIER_NULL)
|
||||
continue;
|
||||
|
||||
auto peep = sprite->As<Peep>();
|
||||
|
||||
Reference in New Issue
Block a user