static bool handle_charset(struct loadparm_context *unused, int snum, const char *pszParmValue, char **ptr)
{
- if (strcmp(*ptr, pszParmValue) != 0) {
+ if (*ptr == NULL || strcmp(*ptr, pszParmValue) != 0) {
string_set(Globals.ctx, ptr, pszParmValue);
init_iconv();
}
}
}
- if (strcmp(*ptr, pszParmValue) != 0) {
+ if (*ptr == NULL || strcmp(*ptr, pszParmValue) != 0) {
if (is_utf8) {
DEBUG(0,("ERROR: invalid DOS charset: 'dos charset' must not "
"be UTF8, using (default value) %s instead.\n",