[bugfix] Fix nil ptr in DifferentFrom func (#4477)

Closes https://codeberg.org/superseriousbusiness/gotosocial/issues/4476

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4477
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
This commit is contained in:
tobi 2025-10-06 11:45:40 +02:00 committed by tobi
commit 03fc6eaf39

View file

@ -244,6 +244,12 @@ func (pr1 *PolicyRules) DifferentFrom(pr2 *PolicyRules) bool {
return true
}
// If they're both nil we don't
// need to check anything else.
if pr1 == nil && pr2 == nil {
return false
}
// Check if AutomaticApproval
// differs between the two.
if slices.Compare(