[#1602] Fix crash when attempting to render a non-randomized item in bombchu bowling (#1604)

This commit is contained in:
Garrett Cox 2022-09-26 17:24:19 -05:00 committed by GitHub
parent 7a516c72c3
commit 0e1248f840
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -511,7 +511,7 @@ void EnExItem_DrawItems(EnExItem* this, GlobalContext* globalCtx) {
if (this) {} if (this) {}
func_8002ED80(&this->actor, globalCtx, 0); func_8002ED80(&this->actor, globalCtx, 0);
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
GetItemEntry randoGetItem; GetItemEntry randoGetItem = (GetItemEntry)GET_ITEM_NONE;
switch (this->type) { switch (this->type) {
case EXITEM_BOMB_BAG_BOWLING: case EXITEM_BOMB_BAG_BOWLING:
case EXITEM_BOMB_BAG_COUNTER: case EXITEM_BOMB_BAG_COUNTER:
@ -526,9 +526,11 @@ void EnExItem_DrawItems(EnExItem* this, GlobalContext* globalCtx) {
break; break;
} }
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItem); if (randoGetItem.getItemId != GI_NONE) {
GetItemEntry_Draw(globalCtx, randoGetItem); EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItem);
return; GetItemEntry_Draw(globalCtx, randoGetItem);
return;
}
} }
GetItem_Draw(globalCtx, this->giDrawId); GetItem_Draw(globalCtx, this->giDrawId);