Summary: | cl crashes after accounts were removed | ||
---|---|---|---|
Product: | [Unmaintained] telepathy | Reporter: | Alin M Elena <alinm.elena> |
Component: | contactlist | Assignee: | Unassigned bugs mailing-list <unassigned-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | kde |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | 0.4.0 | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Alin M Elena
2011-04-28 00:26:59 UTC
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. Git commit b4ec627f1e61012db3a618c8fd919385d94952d8 by Martin Klapetek. Committed on 09/06/2011 at 13:03. Pushed by mklapetek into branch 'master'. Fix a crash when the config contains invalid account ID for setting avatar. Reviewed-by: David Edmundson BUG: 271882 M +13 -1 main-widget.cpp http://commits.kde.org/telepathy-contact-list/b4ec627f1e61012db3a618c8fd919385d94952d8 |