X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f239af65af594968e2fe6885e389a5bd28d73d9d..4a2d030adfa836f6ada1830c9057170d053bcc64:/src/msw/ole/automtn.cpp diff --git a/src/msw/ole/automtn.cpp b/src/msw/ole/automtn.cpp index 9c3600dd12..b3f5f72e4a 100644 --- a/src/msw/ole/automtn.cpp +++ b/src/msw/ole/automtn.cpp @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 11/6/98 -// RCS-ID: $Id$ // Copyright: (c) 1998, Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -222,6 +221,12 @@ bool wxAutomationObject::Invoke(const wxString& member, int action, { 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;