From db3e9feab6a0fd6c6f851ef232d241e257cc63da Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Wed, 17 Oct 2007 22:55:50 +0000 Subject: [PATCH] qt4: The media library can be disabled --- .../gui/qt4/components/playlist/standardpanel.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp index bbf24c807c..95f82c8053 100644 --- a/modules/gui/qt4/components/playlist/standardpanel.cpp +++ b/modules/gui/qt4/components/playlist/standardpanel.cpp @@ -204,8 +204,10 @@ void StandardPLPanel::setCurrentRootId( int _new ) addButton->setEnabled( true ); addButton->setToolTip( qtr(I_PL_ADDPL) ); } - else if( currentRootId == THEPL->p_ml_category->i_id || - currentRootId == THEPL->p_ml_onelevel->i_id ) + else if( ( THEPL->p_ml_category && + currentRootId == THEPL->p_ml_category->i_id ) || + ( THEPL->p_ml_onelevel && + currentRootId == THEPL->p_ml_onelevel->i_id ) ) { addButton->setEnabled( true ); addButton->setToolTip( qtr(I_PL_ADDML) ); @@ -224,8 +226,10 @@ void StandardPLPanel::popupAdd() popup.addAction( qtr(I_PL_ADVADD), THEDP, SLOT(PLAppendDialog()) ); popup.addAction( qtr(I_PL_ADDDIR), THEDP, SLOT( PLAppendDir()) ); } - else if( currentRootId == THEPL->p_ml_category->i_id || - currentRootId == THEPL->p_ml_onelevel->i_id ) + else if( ( THEPL->p_ml_category && + currentRootId == THEPL->p_ml_category->i_id ) || + ( THEPL->p_ml_onelevel && + currentRootId == THEPL->p_ml_onelevel->i_id ) ) { popup.addAction( qtr(I_PL_ADDF), THEDP, SLOT(simpleMLAppendDialog())); popup.addAction( qtr(I_PL_ADVADD), THEDP, SLOT( MLAppendDialog() ) ); -- 2.20.1