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:24:09 +0000 (19:24 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 23 Feb 2008 19:24:09 +0000 (19:24 +0000)
platforms this works, but on some it crashes.  Zdenek Kotala

src/backend/utils/misc/help_config.c

index 681cd57c6de4bc6a1d3583323a5718fe00febcc3..79c0d854bec59d223ad8c6d9b24c1a1b742e3993 100644 (file)
@@ -117,7 +117,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: