X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d84afea9d1ec41ee4e2ebb3bf6b87926cf5f04d1..e74563e412a08aa004c5429efed7ef0031c2c1bf:/include/wx/arrimpl.cpp diff --git a/include/wx/arrimpl.cpp b/include/wx/arrimpl.cpp index 8296608a01..46f94e5dab 100644 --- a/include/wx/arrimpl.cpp +++ b/include/wx/arrimpl.cpp @@ -75,6 +75,8 @@ void name::RemoveAt(size_t uiIndex, size_t nRemove) \ \ void name::Add(const T& item, size_t nInsert) \ { \ + if (nInsert == 0) \ + return; \ T* pItem = new T(item); \ size_t nOldSize = GetCount(); \ if ( pItem != NULL ) \ @@ -85,6 +87,8 @@ void name::Add(const T& item, size_t nInsert) \ \ void name::Insert(const T& item, size_t uiIndex, size_t nInsert) \ { \ + if (nInsert == 0) \ + return; \ T* pItem = new T(item); \ if ( pItem != NULL ) \ wxBaseArrayPtrVoid::Insert(pItem, uiIndex, nInsert); \