zclwrite: Don't crash if EachToken called on a nil TokenSeq.
This commit is contained in:
parent
69a87c73b4
commit
ed2a739cdb
@ -51,6 +51,9 @@ func (ts Tokens) EachToken(cb TokenCallback) {
|
||||
}
|
||||
|
||||
func (ts *TokenSeq) EachToken(cb TokenCallback) {
|
||||
if ts == nil {
|
||||
return
|
||||
}
|
||||
for _, gen := range *ts {
|
||||
gen.EachToken(cb)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user