diff --git a/telegram/updates/state.go b/telegram/updates/state.go index 2332c6391e..5fbe900f0b 100644 --- a/telegram/updates/state.go +++ b/telegram/updates/state.go @@ -138,6 +138,12 @@ func (s *internalState) Push(ctx context.Context, u tg.UpdatesClass) error { } func (s *internalState) Run(ctx context.Context) error { + if s == nil { + return errors.New("invalid: nil internalState") + } + if s.log == nil { + return errors.New("invalid: nil logger") + } s.log.Debug("Starting updates handler") defer s.log.Debug("Updates handler stopped") s.getDifferenceLogger(ctx)