The iterator passed as argument could be invalidated by the function itself,
update it before using it.
Closes #13371.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68468 
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
 All:
 
 - Fix parsing of negated long options in wxCmdLineParser (roed_bis).
+- Fix crash in wxArray::insert() overload taking iterator range (wsu).
 
 All (GUI):
 
 
       return;                                                               \
   Grow(nInsert);                                                            \
                                                                             \
+  /* old iterator could have been invalidated by Grow(). */                 \
+  it = begin() + nInsert;                                                   \
+                                                                            \
   memmove(&m_pItems[nIndex + nInsert], &m_pItems[nIndex],                   \
           (m_nCount - nIndex)*sizeof(T));                                   \
   for (size_t i = 0; i < nInsert; ++i, ++it, ++first)                       \