From b6c806a78901183794a5f14bbed5185365d433ae Mon Sep 17 00:00:00 2001 From: yusing Date: Fri, 13 Dec 2024 00:46:45 +0800 Subject: [PATCH] fix notif dispatcher nil panic --- internal/notif/dispatcher.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/notif/dispatcher.go b/internal/notif/dispatcher.go index 8464b45..8bc4438 100644 --- a/internal/notif/dispatcher.go +++ b/internal/notif/dispatcher.go @@ -46,6 +46,9 @@ func StartNotifDispatcher(parent task.Task) *Dispatcher { } func Notify(msg *LogMessage) { + if dispatcher == nil { + return + } dispatcher.logCh <- msg }