]> git.saurik.com Git - wxWidgets.git/commitdiff
don't overwrite the app name with argv[0] if it had been already set
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Sep 2002 20:26:07 +0000 (20:26 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Sep 2002 20:26:07 +0000 (20:26 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/app.cpp

index a6ba1ee020db779c6967d83b57bc7e9c6723d706..8f9782d2d1c1d1e812704f1c9f73e51e8babb978 100644 (file)
@@ -474,7 +474,9 @@ void wxApp::ConvertToStandardCommandArgs(const char* lpCmdLine)
     wxString name;
     wxFileName::SplitPath(argv[0], NULL, &name, NULL);
 
-    SetAppName(name);
+    // but don't override the name already set by the user code, if any
+    if ( GetAppName().empty() )
+        SetAppName(name);
 
     // copy all the other arguments to wxApp::argv[]
     for ( int i = 1; i < argc; i++ )