]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/ole/automtn.cpp
don't crash when destroying a not initialized socket (patch 1489095)
[wxWidgets.git] / src / msw / ole / automtn.cpp
index 548ac661a80955cc789268c98b7c2335a9d3a094..28464845afae3d926efde7342e6b39122b975e56 100644 (file)
 // With Borland C++, all samples crash if this is compiled in.
 #if wxUSE_OLE && !(defined(__BORLANDC__) && (__BORLANDC__ < 0x520)) && !defined(__CYGWIN10__)
 
+#ifndef WX_PRECOMP
+    #include "wx/log.h"
+#endif
+
 #define _FORCENAMELESSUNION
-#include "wx/log.h"
 #include "wx/msw/private.h"
 #include "wx/msw/ole/oleutils.h"
 #include "wx/msw/ole/automtn.h"
@@ -88,7 +91,7 @@ bool wxAutomationObject::Invoke(const wxString& member, int action,
     {
         // Use dot notation to get the next object
         wxString member2(nonConstMember.Left((size_t) ch));
-        wxString rest(nonConstMember.Right(nonConstMember.Length() - ch - 1));
+        wxString rest(nonConstMember.Right(nonConstMember.length() - ch - 1));
         wxAutomationObject obj;
         if (!GetObject(obj, member2))
             return false;