mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-07 12:17:38 +00:00
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…
x
Reference in New Issue
Block a user