From: Lukas Durfina Date: Mon, 23 Jun 2008 17:33:21 +0000 (+0200) Subject: Avoid potential problems with bad saved value X-Git-Tag: 0.9.0-test1~127 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=f7bb9fcf168e22df7ac7a056ec989ce8ef41ffb4;p=vlc Avoid potential problems with bad saved value Signed-off-by: Jean-Baptiste Kempf --- diff --git a/modules/gui/qt4/components/playlist/playlist_item.cpp b/modules/gui/qt4/components/playlist/playlist_item.cpp index fd25e3efef..507ffc77aa 100644 --- a/modules/gui/qt4/components/playlist/playlist_item.cpp +++ b/modules/gui/qt4/components/playlist/playlist_item.cpp @@ -73,7 +73,10 @@ void PLItem::init( int _i_id, int _i_input_id, PLItem *parent, PLModel *m ) QSettings settings( "vlc", "vlc-qt-interface" ); i_showflags = settings.value( "qt-pl-showflags", 39 ).toInt(); if( i_showflags < 1) - i_showflags = 39; //reasonable default to show something; + i_showflags = 39; /* reasonable default to show something; */ + else if ( i_showflags >= COLUMN_END ) + i_showflags = COLUMN_END - 1; /* show everything */ + updateColumnHeaders(); } }