more paranoid return value checking

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15563 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
henry 2005-05-24 08:42:20 +00:00
parent ec7e1a378c
commit a9c37819b2
1 changed files with 1 additions and 1 deletions

View File

@ -1329,7 +1329,7 @@ void* guess_cp(FILE *fd, char *preferred_language, char *fallback)
analyser = enca_analyser_alloc(languages[i]);
encoding = enca_analyse_const(analyser, buffer, buflen);
tmp = enca_charset_name(encoding.charset, ENCA_NAME_STYLE_ICONV);
if (tmp) {
if (tmp && encoding.charset != ENCA_CS_UNKNOWN) {
detected_sub_cp = strdup(tmp);
mp_msg(MSGT_SUBREADER, MSGL_INFO, "ENCA detected charset: %s\n", tmp);
}