mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
AppFwk: Line Editor: Guard for index out of range
This commit is contained in:
@@ -223,7 +223,11 @@ void PdmUiLineEditor::configureAndUpdateUi(const QString& uiConfigName)
|
||||
if (!enumNames.isEmpty() && fromMenuOnly == true)
|
||||
{
|
||||
int enumValue = field()->uiValue().toInt();
|
||||
m_lineEdit->setText(enumNames[enumValue].optionUiText());
|
||||
|
||||
if (enumValue < enumNames.size() && enumValue > -1)
|
||||
{
|
||||
m_lineEdit->setText(enumNames[enumValue].optionUiText());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user