]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/ole/automtn.cpp
Fix wxGrid editors background painting.
[wxWidgets.git] / src / msw / ole / automtn.cpp
index 9c3600dd121e7466eb8dc6826db39611750372ed..369dfec16fe5242347566fde5d1b1dce7f32d48b 100644 (file)
@@ -222,6 +222,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;