mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
Fixed crash in note_pool_clear()
This commit is contained in:
parent
9836937eb1
commit
43e63b854b
1 changed files with 7 additions and 4 deletions
|
|
@ -951,13 +951,16 @@ void init_note_free_list(void) {
|
|||
}
|
||||
|
||||
void note_pool_clear(struct NotePool *pool) {
|
||||
if (!pool) { return; }
|
||||
s32 i;
|
||||
struct AudioListItem *source;
|
||||
struct AudioListItem *cur;
|
||||
struct AudioListItem *dest;
|
||||
struct AudioListItem *source = NULL;
|
||||
struct AudioListItem *cur = NULL;
|
||||
struct AudioListItem *dest = NULL;
|
||||
UNUSED s32 j; // unused in EU
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
source = NULL;
|
||||
dest = NULL;
|
||||
switch (i) {
|
||||
case 0:
|
||||
source = &pool->disabled;
|
||||
|
|
@ -979,7 +982,7 @@ void note_pool_clear(struct NotePool *pool) {
|
|||
dest = &gNoteFreeLists.active;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!source || !dest) { continue; }
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
for (;;) {
|
||||
cur = source->next;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue