Skip to content
Snippets Groups Projects
Commit 93870638 authored by Edric Milaret's avatar Edric Milaret
Browse files

im: fix invalid use of an ancient account

- The account pointer is null because this
account no longer exist

Change-Id: Icd5a830418de1ddbc9e77a5c8ee7c6a3d8a0f5b1
Tuleap: #257
parent f128c472
Branches
Tags
No related merge requests found
......@@ -638,7 +638,12 @@ QVariant InstantMessagingModel::data( const QModelIndex& idx, int role) const
&& m_pRecording->call()->account()->contactMethod()->contact()) {
auto cm = m_pRecording->call()->account()->contactMethod();
return GlobalInstances::pixmapManipulator().decorationRole(cm);
} else if (n->m_pMessage->direction == Media::Media::Direction::OUT){
} else if (n->m_pMessage->direction == Media::Media::Direction::OUT && n->m_pContactMethod->account()){
return GlobalInstances::pixmapManipulator().decorationRole(n->m_pContactMethod->account()->contactMethod());
} else {
/* It's most likely an account that doesn't exist anymore
* Use a fallback image in pixmapManipulator
*/
return GlobalInstances::pixmapManipulator().decorationRole((ContactMethod*)nullptr);
}
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment