diff options
Diffstat (limited to 'xeth/xeth.go')
-rw-r--r-- | xeth/xeth.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xeth/xeth.go b/xeth/xeth.go index 19c42a9a3..a45ce688b 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -644,7 +644,9 @@ func (p *XEth) NewWhisperFilter(to, from string, topics [][]string) int { callback := func(msg WhisperMessage) { p.messagesMu.RLock() // Only read lock to the filter pool defer p.messagesMu.RUnlock() - p.messages[id].insert(msg) + if p.messages[id] != nil { + p.messages[id].insert(msg) + } } // Initialize the core whisper filter and wrap into xeth id = p.Whisper().Watch(to, from, topics, callback) |