diff options
-rw-r--r-- | src/tool_operate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c index e2b287269..f36f3ce53 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -2574,7 +2574,7 @@ static CURLcode run_all_transfers(struct GlobalConfig *global, CURLcode operate(struct GlobalConfig *global, int argc, argv_item_t argv[]) { CURLcode result = CURLE_OK; - char *first_arg = curlx_convert_tchar_to_UTF8(argv[1]); + char *first_arg = argc > 1 ? curlx_convert_tchar_to_UTF8(argv[1]) : NULL; /* Setup proper locale from environment */ #ifdef HAVE_SETLOCALE |