fix: App crash while switching accounts
App is crashing when mapFromSourceRoles is called with 0 m_rolesMappingFromSource length
This commit is contained in:
parent
277175dbf3
commit
4b1b779bee
|
@ -685,6 +685,9 @@ QVector<int> ConcatModel::mapFromSourceRoles(
|
|||
int sourceIndex, const QVector<int>& sourceRoles) const
|
||||
{
|
||||
QVector<int> mapped;
|
||||
if (sourceIndex < 0 || sourceIndex >= m_rolesMappingFromSource.size())
|
||||
return mapped;
|
||||
|
||||
mapped.reserve(sourceRoles.size());
|
||||
|
||||
auto& mapping = m_rolesMappingFromSource[sourceIndex];
|
||||
|
|
Loading…
Reference in New Issue