Skip to content

Commit

Permalink
Fix crash in vortex subscriber when there is no filter (#97) (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
dstiliadis authored Aug 10, 2019
1 parent 4dea81d commit 5a93585
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion manipvortex/manipulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -701,10 +701,15 @@ func (m *vortexManipulator) pushEvent(evt *elemental.Event) {
m.RLock()
defer m.RUnlock()

var isFiltered bool

for _, s := range m.subscribers {

s.RLock()
isFiltered := s.filter.IsFilteredOut(evt.Identity, evt.Type)
isFiltered = false
if s.filter != nil {
isFiltered = s.filter.IsFilteredOut(evt.Identity, evt.Type)
}
s.RUnlock()

if !isFiltered {
Expand Down

0 comments on commit 5a93585

Please sign in to comment.