Fix crash in geo_switch_mario_cap_on_off

This commit is contained in:
MysterD 2022-05-09 05:09:22 -07:00
parent 7a71c9c284
commit 059842b600
1 changed files with 1 additions and 0 deletions

View File

@ -652,6 +652,7 @@ Gfx* geo_switch_mario_cap_on_off(s32 callContext, struct GraphNode* node, UNUSED
struct MarioBodyState* bodyState = geo_get_body_state();
if (callContext == GEO_CONTEXT_RENDER) {
if (switchCase == NULL || bodyState == NULL) { return NULL; }
switchCase->selectedCase = bodyState->capState & 1;
while (next != node) {
if (next->type == GRAPH_NODE_TYPE_TRANSLATION_ROTATION) {