1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-28 18:19:42 +01:00

Fix crash when expanding last.fm tree.

Fixes issue #463
This commit is contained in:
John Maguire 2010-07-26 17:32:16 +00:00
parent 14dd723e3a
commit fe26c8bb8f

View File

@ -121,12 +121,14 @@ void SimpleTreeItem<T>::DeleteNotify(int child_row) {
template <typename T>
void SimpleTreeItem<T>::ClearNotify() {
model->BeginDelete(static_cast<T*>(this), 0, children.count()-1);
if (children.count()) {
model->BeginDelete(static_cast<T*>(this), 0, children.count() - 1);
qDeleteAll(children);
children.clear();
qDeleteAll(children);
children.clear();
model->EndDelete();
model->EndDelete();
}
}
template <typename T>