1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-02-05 21:53:28 +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> template <typename T>
void SimpleTreeItem<T>::ClearNotify() { 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); qDeleteAll(children);
children.clear(); children.clear();
model->EndDelete(); model->EndDelete();
}
} }
template <typename T> template <typename T>