summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/pgbench/pgbench.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index 7eb6a2dea27..2c0a3182d34 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -2686,7 +2686,8 @@ findBuiltin(const char *name, char **desc)
static void
addScript(const char *name, Command **commands)
{
- if (commands == NULL)
+ if (commands == NULL ||
+ commands[0] == NULL)
{
fprintf(stderr, "empty command list for script \"%s\"\n", name);
exit(1);