summaryrefslogtreecommitdiff
path: root/builtin-checkout.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-checkout.c')
-rw-r--r--builtin-checkout.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin-checkout.c b/builtin-checkout.c
index 4a4bb8b..9579ff4 100644
--- a/builtin-checkout.c
+++ b/builtin-checkout.c
@@ -545,6 +545,10 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
if (argc) {
const char **pathspec = get_pathspec(prefix, argv);
+
+ if (!pathspec)
+ die("invalid path specification");
+
/* Checkout paths */
if (opts.new_branch || opts.force || opts.merge) {
if (argc == 1) {