Prevent crash in mac CLI application if command-line is not properly parsed (NULL argv causes segmentation fault when printing usage).

This commit is contained in:
Benoît LeBlanc 2013-12-09 14:28:32 -05:00
parent cb46bbade0
commit 065ba4f500

View File

@ -94,7 +94,13 @@ void mac_set_view_size(rdpContext* context, MRDPView* view);
}
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;
}