mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-28 23:13:02 +00:00
Fixed crash in get_mario_spawn_type()
This commit is contained in:
parent
230ba17c8d
commit
9836937eb1
1 changed files with 3 additions and 2 deletions
|
@ -148,9 +148,10 @@ void print_intro_text(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 get_mario_spawn_type(struct Object *o) {
|
u32 get_mario_spawn_type(struct Object *o) {
|
||||||
if (o == NULL) { return 0; }
|
if (o == NULL || o->behavior == NULL) { return 0; }
|
||||||
|
|
||||||
const BehaviorScript *behavior = virtual_to_segmented(0x13, o->behavior);
|
const BehaviorScript *behavior = virtual_to_segmented(0x13, o->behavior);
|
||||||
|
if (behavior == NULL) { return 0; }
|
||||||
|
|
||||||
for (s32 i = 0; i < 20; i++) {
|
for (s32 i = 0; i < 20; i++) {
|
||||||
if (sWarpBhvSpawnTable[i] == behavior) {
|
if (sWarpBhvSpawnTable[i] == behavior) {
|
||||||
|
@ -182,7 +183,7 @@ struct ObjectWarpNode *area_get_warp_node_from_params(struct Object *o) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void load_obj_warp_nodes(void) {
|
void load_obj_warp_nodes(void) {
|
||||||
struct ObjectWarpNode *sp24;
|
struct ObjectWarpNode *sp24 = NULL;
|
||||||
struct Object *sp20 = (struct Object *) gObjParentGraphNode.children;
|
struct Object *sp20 = (struct Object *) gObjParentGraphNode.children;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
|
Loading…
Reference in a new issue