summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-06-03 17:34:28 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-06-03 17:34:28 +0900
commita810b668d20442a866d09634e33dbd050b888456 (patch)
tree0dae51a3284ac8e4f212db18456f7e1de76a7766
parent7f6dbcc6420bac9a9ef55eaeb523ac0bc8040bd6 (diff)
downloadtdemultimedia-a810b668d20442a866d09634e33dbd050b888456.tar.gz
tdemultimedia-a810b668d20442a866d09634e33dbd050b888456.zip
KMix: fixed runtime crash happening when only one mixer is available and the user chooses 'Show Master Channel...' from RMB menu.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--kmix/dialogselectmaster.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/kmix/dialogselectmaster.cpp b/kmix/dialogselectmaster.cpp
index 7dbd9d13..9b568f80 100644
--- a/kmix/dialogselectmaster.cpp
+++ b/kmix/dialogselectmaster.cpp
@@ -114,12 +114,15 @@ void DialogSelectMaster::show(Mixer *curr_mixer)
}
masterSelectionChanged(0);
- for (Mixer *mixer = Mixer::mixers().first(); mixer; mixer = Mixer::mixers().next())
+ if (Mixer::mixers().count() > 1)
{
- if (curr_mixer == mixer)
- {
- m_cMixer->setCurrentItem(mixer->mixerName());
- }
+ for (Mixer *mixer = Mixer::mixers().first(); mixer; mixer = Mixer::mixers().next())
+ {
+ if (curr_mixer == mixer)
+ {
+ m_cMixer->setCurrentItem(mixer->mixerName());
+ }
+ }
}
createPage(curr_mixer);