git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@519
959494ce-11ee-0310-bf91-
de5d638817bd
free(buf);
if((buf = icmbstowcs(mbs, charset)) == NULL)
{
- if(*def == '~')
+ if((def != NULL) && (*def == L'~'))
{
flog(LOG_WARNING, "icsmbstowcs: could not convert wcs string into charset %s: %s", charset, strerror(errno));
def++;
free(buf);
if((buf = icwcstombs(wcs, charset)) == NULL)
{
- if(*def == '~')
+ if((def != NULL) && (*def == '~'))
{
flog(LOG_WARNING, "icswcstombs: could not convert mbs string from charset %s: %s", charset, strerror(errno));
def++;