[vlc-devel] commit: Avoid potential problems with bad saved value (Lukas Durfina )

git version control git at videolan.org
Tue Jun 24 16:04:17 CEST 2008


vlc | branch: master | Lukas Durfina <lukas.durfina at gmail.com> | Mon Jun 23 19:33:21 2008 +0200| [f7bb9fcf168e22df7ac7a056ec989ce8ef41ffb4]

Avoid potential problems with bad saved value

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f7bb9fcf168e22df7ac7a056ec989ce8ef41ffb4
---

 .../gui/qt4/components/playlist/playlist_item.cpp  |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/playlist_item.cpp b/modules/gui/qt4/components/playlist/playlist_item.cpp
index fd25e3e..507ffc7 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();
         }
     }




More information about the vlc-devel mailing list