[Bug 271882] cl crashes after accounts were removed

David Edmundson kde at davidedmundson.co.uk
Wed Apr 27 23:32:35 BST 2011


https://bugs.kde.org/show_bug.cgi?id=271882


David Edmundson <kde at davidedmundson.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kde at davidedmundson.co.uk




--- Comment #1 from David Edmundson <kde davidedmundson co uk>  2011-04-28 00:32:34 ---
My money is on it being this line:


Tp::Avatar avatar =
qobject_cast<AccountsModelItem*>(m_model->accountItemForId(accountUID))->data(AccountsModel::AvatarRole).value<Tp::Avatar>();

What if "accountItemForId()" returns 0? (which it can do, especially if an
account has just been deleted and the config file says to load its avatar)

Whenever you do anything than can return 0, it's best to check before ever
calling "->" on it.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Unassigned-bugs mailing list