Fix CID 1164566 (Dereference after null check)

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2018-07-05 21:53:50 +02:00
parent 036c72ca2f
commit bfe2a79502

View File

@ -575,9 +575,9 @@ bool LanguageModel::AddViterbiStateEntry(
else
tprintf("\n");
}
ASSERT_HOST(curr_state != nullptr);
// Check whether the list is full.
if (curr_state != nullptr &&
curr_state->viterbi_state_entries_length >=
if (curr_state->viterbi_state_entries_length >=
language_model_viterbi_list_max_size) {
if (language_model_debug_level > 1) {
tprintf("AddViterbiStateEntry: viterbi list is full!\n");