Skip to content
Snippets Groups Projects
Commit 216b27cf authored by Edric Milaret's avatar Edric Milaret Committed by Alexandre Lision
Browse files

contactmethod: fix for call list being empty

Introduced by changes 2791
Issue: #75334

Change-Id: I03acdcedacb481e352f58c9e1f9aac5423e157f2
parent 0d723ec1
Branches
Tags
No related merge requests found
...@@ -457,7 +457,7 @@ QVariant ContactMethod::roleData(int role) const ...@@ -457,7 +457,7 @@ QVariant ContactMethod::roleData(int role) const
{ {
QVariant cat; QVariant cat;
auto lastCall = d_ptr->m_lCalls.last(); auto lastCall = d_ptr->m_lCalls.isEmpty() ? nullptr : d_ptr->m_lCalls.last();
switch (role) { switch (role) {
case static_cast<int>(Call::Role::Name): case static_cast<int>(Call::Role::Name):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment