diff --git a/src/Filter.cpp b/src/Filter.cpp --- a/src/Filter.cpp +++ b/src/Filter.cpp @@ -190,15 +190,16 @@ Filter::~Filter() { - QListIterator iter(_hotspotList); - while (iter.hasNext()) { - delete iter.next(); - } + reset(); } void Filter::reset() { _hotspots.clear(); + QListIterator iter(_hotspotList); + while (iter.hasNext()) { + delete iter.next(); + } _hotspotList.clear(); }