mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 06:45:42 +01:00
fix crashes when selecting an empty view
alsamixer would crash when a view without controls was selected
This commit is contained in:
parent
2508fc58b5
commit
f72966589c
1 changed files with 10 additions and 0 deletions
|
@ -1926,6 +1926,11 @@ mixer_iteration (void)
|
|||
mixer_view = mixer_view_saved = VIEW_PLAYBACK;
|
||||
mixer_changed_state=1;
|
||||
mixer_reinit ();
|
||||
if (mixer_n_view_elems == 0) {
|
||||
mixer_view = mixer_view_saved = VIEW_CAPTURE;
|
||||
mixer_changed_state=1;
|
||||
mixer_reinit ();
|
||||
}
|
||||
}
|
||||
key = 0;
|
||||
break;
|
||||
|
@ -1937,6 +1942,11 @@ mixer_iteration (void)
|
|||
mixer_view = mixer_view_saved = VIEW_CAPTURE;
|
||||
mixer_changed_state=1;
|
||||
mixer_reinit ();
|
||||
if (mixer_n_view_elems == 0) {
|
||||
mixer_view = mixer_view_saved = VIEW_PLAYBACK;
|
||||
mixer_changed_state=1;
|
||||
mixer_reinit ();
|
||||
}
|
||||
}
|
||||
key = 0;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue