Merge commit 'origin/master' into charset
[pspp-builds.git] / src / data / dictionary.c
index 6e377f803212a6fbdce251ce17b36f3121e28177..b5b6cca58f19bbf1732eae911379f0d4606caf3f 100644 (file)
@@ -78,7 +78,8 @@ struct dictionary
 void
 dict_set_encoding (struct dictionary *d, const char *enc)
 {
-  d->encoding = strdup (enc);
+  if (enc)
+    d->encoding = strdup (enc);
 }
 
 const char *