mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 15:44:11 +02:00
parent
2f78b67e74
commit
ad0ff9839d
@ -175,6 +175,9 @@ void Array::Remove(SizeType index, bool overrideFrozen)
|
||||
if (m_Frozen && !overrideFrozen)
|
||||
BOOST_THROW_EXCEPTION(std::invalid_argument("Array must not be modified."));
|
||||
|
||||
if (index >= m_Data.size())
|
||||
BOOST_THROW_EXCEPTION(std::invalid_argument("Index to remove must be within bounds."));
|
||||
|
||||
m_Data.erase(m_Data.begin() + index);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user