X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/74698d3a22d5e611bbcd731a3ade616c66cfaca6..a59c124d063b0df0b3259d99b5b569206414f8f5:/src/common/cmdline.cpp diff --git a/src/common/cmdline.cpp b/src/common/cmdline.cpp index 1c74dfdb5e..ec1d43bdb4 100644 --- a/src/common/cmdline.cpp +++ b/src/common/cmdline.cpp @@ -842,10 +842,11 @@ int wxCmdLineParser::Parse(bool showUsage) } } - if ( !ok && errorMsg.length() != 0 ) + if ( !ok && (errorMsg.length() != 0 || helpRequested) ) { wxString usage; wxMessageOutput* msgOut = wxMessageOutput::Get(); + wxASSERT(msgOut); if ( showUsage ) usage = GetUsageString(); if ( msgOut ) msgOut->Printf( wxT("%s%s"), usage.c_str(), errorMsg.c_str() );