Commit ae275bdc authored by Ralf Engels's avatar Ralf Engels
Browse files

Avoid using deleted BookmarkTriangles or null BookmarkPopups

BUG: 283753
FIXED-IN: 2.5
parent 41d981d1
......@@ -44,7 +44,8 @@ BookmarkTriangle::BookmarkTriangle ( QWidget *parent, int milliseconds, QString
BookmarkTriangle::~BookmarkTriangle()
{
DEBUG_BLOCK
m_tooltip->deleteLater();
if (m_tooltip)
m_tooltip->deleteLater();
}
QSize BookmarkTriangle::sizeHint() const
......@@ -119,8 +120,10 @@ void BookmarkTriangle::enterEvent ( QEvent * event )
void BookmarkTriangle::leaveEvent ( QEvent * event )
{
DEBUG_BLOCK
Q_UNUSED ( event )
m_tooltip->displayNeeded(false);
if (m_tooltip)
m_tooltip->displayNeeded(false);
}
void BookmarkTriangle::initPopup()
......
......@@ -380,10 +380,11 @@ void Amarok::TimeSlider::slotTriangleFocused( int seconds )
void Amarok::TimeSlider::clearTriangles()
{
// DEBUG_BLOCK
// debug() << "number of triangles: " << m_triangles.count();
qDeleteAll( m_triangles );
// debug() << "deleted them all...";
DEBUG_BLOCK
QList<BookmarkTriangle *>::iterator i;
for( i = m_triangles.begin(); i != m_triangles.end(); ++i ){
(*i)->deleteLater();
}
m_triangles.clear();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment