Skip to content

Commit

Permalink
[src] fix a bug in src/online/online-faster-decoder.cc (prevent segfa…
Browse files Browse the repository at this point in the history
…ult with some models) (kaldi-asr#3634)
  • Loading branch information
freewym authored and Bar-BY committed Jan 21, 2020
1 parent 95bf59a commit 676d4b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/online/online-faster-decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void OnlineFasterDecoder::UpdateImmortalToken() {
unordered_set<Token*> emitting;
for (const Elem *e = toks_.GetList(); e != NULL; e = e->tail) {
Token* tok = e->val;
while (tok->arc_.ilabel == 0) //deal with non-emitting ones ...
while (tok != NULL && tok->arc_.ilabel == 0) //deal with non-emitting ones ...
tok = tok->prev_;
if (tok != NULL)
emitting.insert(tok);
Expand Down

0 comments on commit 676d4b4

Please sign in to comment.