Skip to content

Commit

Permalink
Fixed a crash when the copied index of a select field is invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatyas committed Apr 1, 2024
1 parent 10d684a commit 93debe7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/ui/MI_SelectField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ bool MI_SelectField<T>::setCurrentValue(T value)
template<typename T>
bool MI_SelectField<T>::setCurrentIndex(size_t index)
{
if (m_index < m_items.size()) {
if (index < m_items.size()) {
m_index = index;
updateOutput();
return true;
Expand Down

0 comments on commit 93debe7

Please sign in to comment.