Skip to content

Commit

Permalink
Prevent crash in mac CLI application if command-line is not properly …
Browse files Browse the repository at this point in the history
…parsed (NULL argv causes segmentation fault when printing usage).
  • Loading branch information
Benoît LeBlanc committed Dec 9, 2013
1 parent cb46bba commit 065ba4f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion client/Mac/cli/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,13 @@ - (int) ParseCommandLineArguments
}

status = freerdp_client_settings_parse_command_line(context->settings, argc, argv);
status = freerdp_client_settings_command_line_status_print(context->settings, status, context->argc, context->argv);

if (context->argc && context->argv)
status = freerdp_client_settings_command_line_status_print(context->settings, status, context->argc, context->argv);
else
{
freerdp_client_print_command_line_help(argc, argv);
}

return status;
}
Expand Down

0 comments on commit 065ba4f

Please sign in to comment.