diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2005-01-10 08:25:27 +0000 |
---|---|---|
committer | Clemens Ladisch <clemens@ladisch.de> | 2005-01-10 08:25:27 +0000 |
commit | f72966589cb57d31235bab46816e6d9549079baa (patch) | |
tree | 360fae1f8b49e6a9e20a29bb491385d799d11924 /alsamixer | |
parent | 2508fc58b599bd9189f016425d83a8542537d67c (diff) |
fix crashes when selecting an empty view
alsamixer would crash when a view without controls was selected
Diffstat (limited to 'alsamixer')
-rw-r--r-- | alsamixer/alsamixer.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/alsamixer/alsamixer.c b/alsamixer/alsamixer.c index 806bc11..369d2d3 100644 --- a/alsamixer/alsamixer.c +++ b/alsamixer/alsamixer.c @@ -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; |