inject: fix missing null check

This commit is contained in:
lahm86 2024-08-09 14:07:48 +01:00
parent 8b0d66e979
commit 2d81fbf206

View file

@ -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.