mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-08 07:07:05 +02:00
Pointer safety (Oops #20003)
This commit is contained in:
@@ -312,12 +312,12 @@ ContextMenu::onSocialActionsLoaded()
|
|||||||
if ( m_queries.isEmpty() || m_queries.first().isNull() )
|
if ( m_queries.isEmpty() || m_queries.first().isNull() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( m_queries.first()->loved() )
|
if ( m_loveAction && m_queries.first()->loved() )
|
||||||
{
|
{
|
||||||
m_loveAction->setText( tr( "Un-&Love" ) );
|
m_loveAction->setText( tr( "Un-&Love" ) );
|
||||||
m_loveAction->setIcon( QIcon( RESPATH "images/not-loved.png" ) );
|
m_loveAction->setIcon( QIcon( RESPATH "images/not-loved.png" ) );
|
||||||
}
|
}
|
||||||
else
|
else if ( m_loveAction )
|
||||||
{
|
{
|
||||||
m_loveAction->setText( tr( "&Love" ) );
|
m_loveAction->setText( tr( "&Love" ) );
|
||||||
m_loveAction->setIcon( QIcon( RESPATH "images/loved.png" ) );
|
m_loveAction->setIcon( QIcon( RESPATH "images/loved.png" ) );
|
||||||
|
Reference in New Issue
Block a user