Handle null string pointers.

This commit is contained in:
Bill Currie 2011-02-14 14:20:05 +09:00
parent e10d561459
commit 352be1f8bd

View file

@ -55,6 +55,8 @@ quote_string (const char *str)
static dstring_t *q;
char c[2] = {0, 0};
if (!str)
return "(null)";
if (!q)
q = dstring_new ();
dstring_clearstr (q);