aboutsummaryrefslogtreecommitdiff
path: root/event.go
diff options
context:
space:
mode:
Diffstat (limited to 'event.go')
-rw-r--r--event.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/event.go b/event.go
index ccf57c2..6235ba4 100644
--- a/event.go
+++ b/event.go
@@ -29,7 +29,7 @@ func (e *Event) Clear() {
}
func (e *Event) Fire() {
- if atomic.SwapInt32(&e.guard, 1) != 0 {
+ if e == nil || atomic.SwapInt32(&e.guard, 1) != 0 {
return
}
if now := time.Now(); now.After(e.next) {