From 7518ed1995e9c409b5693bcda09220c9e21ada50 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 11 Oct 2016 11:39:10 +0100 Subject: [PATCH] Fix NPE if oldService is nil --- src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go b/src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go index a0863fb..c0553da 100644 --- a/src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go +++ b/src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go @@ -174,7 +174,7 @@ func (s *rssBotService) Register(oldService types.Service, client *matrix.Client var numOldFeeds int oldFeedService, ok := oldService.(*rssBotService) if !ok { - log.WithField("service_id", oldService.ServiceID()).Error("Old service isn't a rssBotService") + log.WithField("service", oldService).Error("Old service isn't a rssBotService") } else { numOldFeeds = len(oldFeedService.Feeds) }