changeset 12449:44959468c64d

1000000l for sig11 without -subcp!!! (and 1l for my first commit :)
author rfelker
date Sun, 09 May 2004 03:43:42 +0000
parents 180c2fb327d3
children 238820c0ee48
files subreader.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/subreader.c	Sat May 08 23:53:20 2004 +0000
+++ b/subreader.c	Sun May 09 03:43:42 2004 +0000
@@ -1353,10 +1353,10 @@
 	|| sscanf(sub_cp, "ENCA:%2s:%s", enca_lang, enca_fallback) == 2) {
 	current_sub_cp = guess_cp(fd, enca_lang, enca_fallback);
     } else {
-	current_sub_cp = strdup(sub_cp);
+	current_sub_cp = sub_cp ? strdup(sub_cp) : NULL;
     }
 #else
-    current_sub_cp = strdup(sub_cp);
+    current_sub_cp = sub_cp ? strdup(sub_cp) : NULL;
 #endif
 
 #ifdef USE_ICONV