Skip to content
This repository has been archived by the owner on Jun 10, 2021. It is now read-only.

Commit

Permalink
fix crash when no gold score
Browse files Browse the repository at this point in the history
  • Loading branch information
jsenellart committed Apr 6, 2017
1 parent 70e262a commit 7628c34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion onmt/translate/Translator.lua
Expand Up @@ -353,7 +353,7 @@ function Translator:translate(src, gold)
end
end

if next(goldScore) ~= nil then
if goldScore and next(goldScore) ~= nil then
results[b].goldScore = goldScore[b]
end
end
Expand Down

0 comments on commit 7628c34

Please sign in to comment.