mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-04-22 01:52:43 +00:00
Fixed crash in packet_ordered_check_for_processing
This commit is contained in:
parent
03a7c1f086
commit
0aac200258
1 changed files with 2 additions and 3 deletions
|
|
@ -24,8 +24,7 @@ static struct OrderedPacketTable* orderedPacketTable[MAX_PLAYERS] = { 0 };
|
|||
u8 gAllowOrderedPacketClear = 1;
|
||||
|
||||
static void packet_ordered_check_for_processing(struct OrderedPacketTable* opt) {
|
||||
// sanity check
|
||||
SOFT_ASSERT(opt != NULL);
|
||||
if (!opt) { return; }
|
||||
|
||||
struct OrderedPacketList* opl = opt->packets;
|
||||
struct OrderedPacketList* oplLast = opl;
|
||||
|
|
@ -52,7 +51,7 @@ static void packet_ordered_check_for_processing(struct OrderedPacketTable* opt)
|
|||
if (oplLast == opl) {
|
||||
// we processed the head of the list
|
||||
opt->packets = opl->next;
|
||||
} else {
|
||||
} else if (oplLast) {
|
||||
// we processed from after the head
|
||||
oplLast->next = opl->next;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue