From 30b43e78a8080f3204c9aaacb21c3ee3be777baf Mon Sep 17 00:00:00 2001 From: MysterD Date: Fri, 24 Nov 2023 15:02:08 -0800 Subject: [PATCH] Fix crash in network_receive_object --- src/pc/network/packets/packet_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pc/network/packets/packet_object.c b/src/pc/network/packets/packet_object.c index 5d21637b..10ea8535 100644 --- a/src/pc/network/packets/packet_object.c +++ b/src/pc/network/packets/packet_object.c @@ -443,7 +443,7 @@ void network_receive_object(struct Packet* p) { deltaPos[1] = o->oPosZ - oldPos[2]; for (s32 i = 0; i < MAX_PLAYERS; i++) { if (!is_player_active(&gMarioStates[i])) { continue; } - if (gMarioStates[i].marioObj->platform != o) { continue; } + if (!gMarioStates[i].marioObj || gMarioStates[i].marioObj->platform != o) { continue; } for (s32 j = 0; j < 3; j++) { gMarioStates[i].pos[j] += deltaPos[j]; } } }