]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/cmdproc.cpp
need wxUSE_WCHAR_T around wxConvLocal
[wxWidgets.git] / src / common / cmdproc.cpp
index f6d7eb8dd594b3c3933bcfea240760ced947bfcf..7466686e7a5c848ea292f1c7efcaf7d3b74c7c8f 100644 (file)
@@ -93,7 +93,12 @@ bool wxCommandProcessor::Submit(wxCommand *command, bool storeIt)
     wxCHECK_MSG( command, FALSE, _T("no command in wxCommandProcessor::Submit") );
 
     if ( !DoCommand(*command) )
+    {
+        // the user code expects the command to be deleted anyhow
+        delete command;
+
         return FALSE;
+    }
 
     if ( storeIt )
         Store(command);