check hook is not nil

This commit is contained in:
jguer 2022-11-03 16:23:47 +01:00
parent 3fc5d93243
commit a724d1554f
No known key found for this signature in database
GPG key ID: 6D6CC9BEA8556B35

View file

@ -25,6 +25,10 @@ type (
)
func (installer *Installer) AddPostInstallHook(hook PostInstallHookFunc) {
if hook == nil {
return
}
installer.postInstallHooks = append(installer.postInstallHooks, hook)
}