From c26309164b3165e2c0f8bd184def3d787574329f Mon Sep 17 00:00:00 2001 From: Jerzy Kasenberg Date: Wed, 30 Oct 2013 10:31:12 +0100 Subject: [PATCH] android/client: Fix crash in tab completion When user pressed tab on third or later argument when first two did not make sense tool crashed. Now method is checked for NULL before accessing help field. --- android/client/tabcompletion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/client/tabcompletion.c b/android/client/tabcompletion.c index 69af6093e..cc1a5d341 100644 --- a/android/client/tabcompletion.c +++ b/android/client/tabcompletion.c @@ -332,7 +332,7 @@ static void param_completion(int argc, const split_arg_t *arg, if (args.func != NULL) { args.typed = argv[argc - 1]; args.help = method_help; - args.user_help = (void *) method->help; + args.user_help = method ? (void *) method->help : NULL; tab_completion(&args); } -- 2.47.3