Skip to content

Commit

Permalink
Fix nil pointer dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
jraede committed Feb 17, 2017
1 parent cc3f0e0 commit 6213e85
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ func Enable(pattern string) {
}

func IsEnabled(name string) bool {
if reg == nil {
return false
}
return reg.MatchString(name)
}

Expand Down

0 comments on commit 6213e85

Please sign in to comment.