summaryrefslogtreecommitdiff
path: root/internal/event/pair.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/event/pair.go')
-rw-r--r--internal/event/pair.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/internal/event/pair.go b/internal/event/pair.go
index 131c6b3..3eb8a16 100644
--- a/internal/event/pair.go
+++ b/internal/event/pair.go
@@ -120,8 +120,14 @@ func (e *Pair) Dump() string {
}
func (e *Pair) Recycle() {
- e.EnterEv.Recycle()
- e.ExitEv.Recycle()
+ if e.EnterEv != nil {
+ e.EnterEv.Recycle()
+ }
+ if e.ExitEv != nil {
+ e.ExitEv.Recycle()
+ }
+ e.EnterEv = nil
+ e.ExitEv = nil
e.File = nil
e.Comm = ""
e.Duration = 0