We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f860fef commit e0157cbCopy full SHA for e0157cb
src/containers/flatVector2D.tpp
@@ -1091,6 +1091,10 @@ const T* FlatVector2D<T>::operator[](std::size_t i) const
1091
{
1092
assert(isIndexValid(i));
1093
1094
+ if (m_v.empty()) {
1095
+ return nullptr;
1096
+ }
1097
+
1098
std::size_t index = m_index[i];
1099
return &m_v[index];
1100
}
@@ -1106,6 +1110,10 @@ T* FlatVector2D<T>::operator[](std::size_t i)
1106
1110
1107
1111
1108
1112
1113
1114
1115
1116
1109
1117
1118
1119
0 commit comments