From 3319380cf65ae50292816a31c2be3d46c4cf0c32 Mon Sep 17 00:00:00 2001 From: Vesa Date: Thu, 12 Jun 2014 22:34:32 +0300 Subject: [PATCH] FxMixer: Fix channel delete --- include/FxMixer.h | 4 ++-- src/core/FxMixer.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/FxMixer.h b/include/FxMixer.h index 7cecb7803..f8a7c86f6 100644 --- a/include/FxMixer.h +++ b/include/FxMixer.h @@ -22,8 +22,8 @@ * */ -#ifndef _FX_MIXER_H -#define _FX_MIXER_H +#ifndef FX_MIXER_H +#define FX_MIXER_H #include "Model.h" #include "Mixer.h" diff --git a/src/core/FxMixer.cpp b/src/core/FxMixer.cpp index d2c79a972..155be30cd 100644 --- a/src/core/FxMixer.cpp +++ b/src/core/FxMixer.cpp @@ -207,13 +207,13 @@ void FxMixer::deleteChannel(int index) } // delete all of this channel's sends and receives - for(int i=0; im_sends.size(); ++i) + while( ! m_fxChannels[index]->m_sends.isEmpty() ) { - deleteChannelSend(index, m_fxChannels[index]->m_sends[i]); + deleteChannelSend( index, m_fxChannels[index]->m_sends.first() ); } - for(int i=0; im_receives.size(); ++i) + while( ! m_fxChannels[index]->m_receives.isEmpty() ) { - deleteChannelSend(m_fxChannels[index]->m_receives[i], index); + deleteChannelSend( m_fxChannels[index]->m_receives.first(), index ); } for(int i=0; i