summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/src/string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/src/string.c b/src/src/string.c
index 854cf0d34..52b1d2fb5 100644
--- a/src/src/string.c
+++ b/src/src/string.c
@@ -1579,8 +1579,8 @@ while (*fp)
case 'Y': /* gstring pointer */
{
gstring * zg = va_arg(ap, gstring *);
- s = CS zg->s;
- slen = zg->ptr;
+ if (zg) { s = CS zg->s; slen = zg->ptr; }
+ else { s = null; slen = Ustrlen(s); }
goto INSERT_GSTRING;
}