Skip to content

Commit

Permalink
Fixing static analyzer complaint.
Browse files Browse the repository at this point in the history
  • Loading branch information
JanX2 committed Jan 30, 2013
1 parent d3c7d84 commit 9d6e16e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion universalchardet/src/base/nsUniversalDetector.cpp
Expand Up @@ -234,8 +234,11 @@ void nsUniversalDetector::DataEnd()
}
}
//do not report anything because we are not confident of it, that's in fact a negative answer
if (maxProberConfidence > MINIMUM_THRESHOLD)
if ( mCharSetProbers[maxProber] != nullptr &&
maxProberConfidence > MINIMUM_THRESHOLD )
{
Report(mCharSetProbers[maxProber]->GetCharSetName());
}
}
break;
case eEscAscii:
Expand Down

0 comments on commit 9d6e16e

Please sign in to comment.