summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--subreader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/subreader.c b/subreader.c
index 387ba5fce8..fc7a9342b7 100644
--- a/subreader.c
+++ b/subreader.c
@@ -1086,7 +1086,7 @@ void subcp_open (stream_t *st)
int free_cp_tmp = 0;
if (sscanf(sub_cp, "enca:%2s:%99s", enca_lang, enca_fallback) == 2
|| sscanf(sub_cp, "ENCA:%2s:%99s", enca_lang, enca_fallback) == 2) {
- if (enca_fd) {
+ if (st) {
cp_tmp = guess_cp(st, enca_lang, enca_fallback);
free_cp_tmp = 1;
} else {