Skip to content
Snippets Groups Projects
Commit 02395c69 authored by Emmanuel Lepage's avatar Emmanuel Lepage
Browse files

[ #13035 ] Fix crash when hangging up coferences with ourself

parent de784a63
No related branches found
No related tags found
No related merge requests found
...@@ -588,10 +588,12 @@ void CallView::destroyCall(Call* toDestroy) ...@@ -588,10 +588,12 @@ void CallView::destroyCall(Call* toDestroy)
else if (SFLPhone::model()->getIndex(toDestroy)->parent()) { else if (SFLPhone::model()->getIndex(toDestroy)->parent()) {
QTreeWidgetItem* callIndex = SFLPhone::model()->getIndex(toDestroy); QTreeWidgetItem* callIndex = SFLPhone::model()->getIndex(toDestroy);
QTreeWidgetItem* parent = callIndex->parent(); QTreeWidgetItem* parent = callIndex->parent();
if (indexOfTopLevelItem(parent) != -1) {
parent->removeChild(callIndex); parent->removeChild(callIndex);
if (dynamic_cast<QTreeWidgetItem*>(parent) && parent->childCount() == 0) /*This should never happen, but it does*/ if (dynamic_cast<QTreeWidgetItem*>(parent) && parent->childCount() == 0) /*This should never happen, but it does*/
takeTopLevelItem(indexOfTopLevelItem(parent)); takeTopLevelItem(indexOfTopLevelItem(parent));
} }
}
else else
kDebug() << "Call not found"; kDebug() << "Call not found";
} //destroyCall } //destroyCall
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment