]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/cmdline.cpp
Implemented the various printf() functions under
[wxWidgets.git] / src / common / cmdline.cpp
index 1c74dfdb5ecdb3ad65d7f0aff6da1f6ee4dfba32..ec1d43bdb48a59faad5c42acee193a7d5360ef1d 100644 (file)
@@ -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() );