]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Avoid trying to print a NULL char pointer in --describe-config. On some
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 23 Feb 2008 19:23:57 +0000 (19:23 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 23 Feb 2008 19:23:57 +0000 (19:23 +0000)
platforms this works, but on some it crashes.  Zdenek Kotala

src/backend/utils/misc/help_config.c

index bea95be8786bc18594394debb04001839ee3cf08..f4edd26b842716fe84f00b9c9e45dbdda750990d 100644 (file)
@@ -10,7 +10,7 @@
  * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/utils/misc/help_config.c,v 1.14 2004/12/31 22:02:45 pgsql Exp $
+ *       $PostgreSQL: pgsql/src/backend/utils/misc/help_config.c,v 1.14.4.1 2008/02/23 19:23:57 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -118,7 +118,7 @@ printMixedStruct(mixedStruct *structToPrint)
 
                case PGC_STRING:
                        printf("STRING\t%s\t\t\t",
-                                  structToPrint->string.boot_val);
+                                  structToPrint->string.boot_val ? structToPrint->string.boot_val : "");
                        break;
 
                default: