diff options
-rw-r--r-- | libversit/vobject.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libversit/vobject.c b/libversit/vobject.c index d685b04278..2df57c5927 100644 --- a/libversit/vobject.c +++ b/libversit/vobject.c @@ -1435,7 +1435,12 @@ DLLEXPORT(char*) fakeCString(const wchar_t *u) { char *s, *t; int len = uStrLen(u) + 1; + + if (!u) + return strdup(""); + t = s = (char*)malloc(len); + while (*u) { if (*u == (wchar_t)0x2028) *t = '\n'; |