File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -265,7 +265,7 @@ private void SyncPorts(out bool portChanged)
265265 // Input ports
266266 var inputCount = isPlayableValid ? Playable . GetInputCount ( ) : 0 ;
267267 var redundantInputPortCount = InputPorts . Count - inputCount ;
268- for ( int i = 0 ; i < redundantInputPortCount ; i ++ )
268+ for ( int i = InputPorts . Count - 1 ; i >= inputCount ; i -- )
269269 {
270270 // Port won't change frequently, so there's no PortPool
271271 inputContainer . Remove ( InputPorts [ i ] ) ;
@@ -287,8 +287,7 @@ private void SyncPorts(out bool portChanged)
287287
288288 // Output ports
289289 var outputCount = isPlayableValid ? Playable . GetOutputCount ( ) : 0 ;
290- var redundantOutputPortCount = OutputPorts . Count - outputCount ;
291- for ( int i = 0 ; i < redundantOutputPortCount ; i ++ )
290+ for ( int i = OutputPorts . Count - 1 ; i >= outputCount ; i -- )
292291 {
293292 // Port won't change frequently, so there's no PortPool
294293 outputContainer . Remove ( OutputPorts [ i ] ) ;
You can’t perform that action at this time.
0 commit comments