1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-13 20:39:57 +01:00

Pointer safety (Oops #20003)

This commit is contained in:
Leo Franchi 2012-07-17 17:08:28 -04:00
parent cd7efebdf8
commit b09206d2b9

View File

@ -336,12 +336,12 @@ ContextMenu::onSocialActionsLoaded()
if ( m_queries.isEmpty() || m_queries.first().isNull() )
return;
if ( m_queries.first()->loved() )
if ( m_loveAction && m_queries.first()->loved() )
{
m_loveAction->setText( tr( "Un-&Love" ) );
m_loveAction->setIcon( QIcon( RESPATH "images/not-loved.png" ) );
}
else
else if ( m_loveAction )
{
m_loveAction->setText( tr( "&Love" ) );
m_loveAction->setIcon( QIcon( RESPATH "images/loved.png" ) );