Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
ef2ea798
Commit
ef2ea798
authored
Nov 02, 2010
by
ivoire
Browse files
qt4: fix a crash if "view-mode" configuration values are invalid.
parent
1b4f18fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/gui/qt4/components/playlist/standardpanel.cpp
View file @
ef2ea798
...
@@ -73,6 +73,9 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
...
@@ -73,6 +73,9 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
getSettings
()
->
beginGroup
(
"Playlist"
);
getSettings
()
->
beginGroup
(
"Playlist"
);
int
i_savedViewMode
=
getSettings
()
->
value
(
"view-mode"
,
TREE_VIEW
).
toInt
();
int
i_savedViewMode
=
getSettings
()
->
value
(
"view-mode"
,
TREE_VIEW
).
toInt
();
getSettings
()
->
endGroup
();
getSettings
()
->
endGroup
();
/* Limit the saved value to a possible one inside [0, VIEW_COUNT[ */
if
(
i_savedViewMode
<
0
||
i_savedViewMode
>=
VIEW_COUNT
)
i_savedViewMode
=
0
;
showView
(
i_savedViewMode
);
showView
(
i_savedViewMode
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment