forked from qt-creator/qt-creator
Utils: prevent crashes in SelectionAspects
Change-Id: I21315f1cbbc43948f00f00dbef777fa82c9606f5 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -1502,6 +1502,7 @@ int SelectionAspect::indexForDisplay(const QString &displayName) const
|
||||
|
||||
QString SelectionAspect::displayForIndex(int index) const
|
||||
{
|
||||
QTC_ASSERT(index >= 0 && index < d->m_options.size(), return {});
|
||||
return d->m_options.at(index).displayName;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user