Skip to content

Commit

Permalink
inject: fix missing null check
Browse files Browse the repository at this point in the history
  • Loading branch information
lahm86 committed Aug 10, 2024
1 parent 8b0d66e commit 2d81fbf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/game/inject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1169,6 +1169,10 @@ static void Inject_TriggerParameterChange(
const int16_t old_param = File_ReadS16(fp);
const int16_t new_param = File_ReadS16(fp);

if (sector == NULL || sector->trigger == NULL) {
return;
}

// If we can find an action item for the given sector that matches
// the command type and old (current) parameter, change it to the
// new parameter.
Expand Down

0 comments on commit 2d81fbf

Please sign in to comment.