Index: glib/gnulib/vasnprintf.c
===================================================================
--- glib/gnulib/vasnprintf.c	(revision 5655)
+++ glib/gnulib/vasnprintf.c	(working copy)
@@ -571,12 +571,20 @@
 		    case 's':
 # ifdef HAVE_WCHAR_T
 		      if (type == TYPE_WIDE_STRING)
+		        {
+			if (!a.arg[dp->arg_index].a.a_wide_string)
+				a.arg[dp->arg_index].a.a_wide_string = L"(null)";
 			tmp_length =
 			  local_wcslen (a.arg[dp->arg_index].a.a_wide_string)
 			  * MB_CUR_MAX;
+		        }
 		      else
+		        {
 # endif
+			if (!a.arg[dp->arg_index].a.a_string)
+				a.arg[dp->arg_index].a.a_string = "(null)";
 			tmp_length = strlen (a.arg[dp->arg_index].a.a_string);
+		        }
 		      break;
 
 		    case 'p':
