const ItemType& operator[](SizeType index) const
{
DALI_ASSERT_VECTOR(VectorBase::mData && "Vector is empty");
- DALI_ASSERT_VECTOR(index < VectorBase::Count() && "Index out of bounds");
+ if(index >= VectorBase::Count())
+ {
+ // Prevent accessing invalid index
+ index = 0;
+ }
ItemType* address = reinterpret_cast<ItemType*>(VectorBase::mData);
address += index;
return *address;