mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-04-26 12:01:43 +00:00
Fixed crash in find_floor_from_list()
This commit is contained in:
parent
a767df7e73
commit
c088d6f7a4
1 changed files with 5 additions and 1 deletions
|
|
@ -425,6 +425,7 @@ static struct Surface *find_floor_from_list(struct SurfaceNode *surfaceNode, s32
|
|||
// Iterate through the list of floors until there are no more floors.
|
||||
while (surfaceNode != NULL) {
|
||||
surf = surfaceNode->surface;
|
||||
if (surf == NULL) { break; }
|
||||
surfaceNode = surfaceNode->next;
|
||||
interpolate = gInterpolatingSurfaces && surf->modifiedTimestamp == gGlobalTimer;
|
||||
|
||||
|
|
@ -521,7 +522,10 @@ static struct Surface *find_floor_from_list(struct SurfaceNode *surfaceNode, s32
|
|||
continue;
|
||||
}
|
||||
|
||||
*pheight = height;
|
||||
if (pheight != NULL) {
|
||||
*pheight = height;
|
||||
}
|
||||
|
||||
if (interpolate) {
|
||||
static struct Surface s;
|
||||
s.type = surf->type;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue