]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/ole/automtn.cpp
Fix problem with COMDLG_FILTERSPEC declaration with MinGW-w64 4.8.
[wxWidgets.git] / src / msw / ole / automtn.cpp
index 9c3600dd121e7466eb8dc6826db39611750372ed..b3f5f72e4aeb619c900e461ecf8b54384662dc5a 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     11/6/98
 // Author:      Julian Smart
 // Modified by:
 // Created:     11/6/98
-// RCS-ID:      $Id$
 // Copyright:   (c) 1998, Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 // Copyright:   (c) 1998, Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -222,6 +221,12 @@ bool wxAutomationObject::Invoke(const wxString& member, int action,
             {
                 vReturn.pdispVal = NULL;
             }
             {
                 vReturn.pdispVal = NULL;
             }
+            // Mustn't free the SAFEARRAY if it is contained in the retValue
+            if ((vReturn.vt & VT_ARRAY) &&
+                    retValue.GetType() == wxS("safearray"))
+            {
+                vReturn.parray = NULL;
+            }
         }
     }
     return true;
         }
     }
     return true;