Skip to content

Commit

Permalink
chore(dlgprefsound): Make container cost to prevent detach in loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus committed Sep 26, 2023
1 parent 7534092 commit 4ee05eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/preferences/dialog/dlgprefsound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ DlgPrefSound::DlgPrefSound(QWidget* pParent,
&DlgPrefSound::apiChanged);

sampleRateComboBox->clear();
for (const auto& sampleRate : m_pSoundManager->getSampleRates()) {
const auto sampleRates = m_pSoundManager->getSampleRates();
for (const auto& sampleRate : sampleRates) {
if (sampleRate.isValid()) {
// no ridiculous sample rate values. prohibiting zero means
// avoiding a potential div-by-0 error in ::updateLatencies
Expand Down

0 comments on commit 4ee05eb

Please sign in to comment.