Avoid trying to print a NULL char pointer in --describe-config. On some
authorTom Lane <[email protected]>
Sat, 23 Feb 2008 19:23:51 +0000 (19:23 +0000)
committerTom Lane <[email protected]>
Sat, 23 Feb 2008 19:23:51 +0000 (19:23 +0000)
platforms this works, but on some it crashes.  Zdenek Kotala

src/backend/utils/misc/help_config.c

index fcbea3387388e856be4b3454830b557fde83a4e9..7222e2f3c045cedec1f619030ace6db1de2f6095 100644 (file)
@@ -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: