Commit 93b291db authored by Rémi Duraffort's avatar Rémi Duraffort

qt4: fix a crash if "view-mode" configuration values are invalid.

(cherry picked from commit ef2ea79839f18fd32172344596473820d6d35cbe)
Signed-off-by: default avatarRémi Duraffort <ivoire@videolan.org>
parent 3585382d
......@@ -125,6 +125,9 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
int i_viewMode = getSettings()->value( "view-mode", TREE_VIEW ).toInt();
getSettings()->endGroup();
/* Limit the saved value to a possible one inside [0, VIEW_COUNT[ */
if(i_viewMode < 0 || i_viewMode >= VIEW_COUNT)
i_viewMode = 0;
showView( i_viewMode );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment