mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 20:58:07 +03:00
inject: fix missing null check
This commit is contained in:
parent
8b0d66e979
commit
2d81fbf206
1 changed files with 4 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue