From ac02a9f660977426b8ec6392919fbb1d51b10998 Mon Sep 17 00:00:00 2001 From: Billy O'Neal Date: Fri, 15 Sep 2023 12:17:41 -0700 Subject: [PATCH] Fix crash running `vcpkg help commands` reported by @JavierMatosD (#1199) --- src/vcpkg/commands.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vcpkg/commands.cpp b/src/vcpkg/commands.cpp index b587cac7bc..a93393c38b 100644 --- a/src/vcpkg/commands.cpp +++ b/src/vcpkg/commands.cpp @@ -148,7 +148,10 @@ namespace vcpkg static void format_command_usage_entry(HelpTableFormatter& table, const CommandMetadata& metadata) { - table.format(metadata.name, metadata.synopsis.to_string()); + if (metadata.synopsis) + { + table.format(metadata.name, metadata.synopsis.to_string()); + } } void print_zero_args_usage()